Skip to content

Commit

Permalink
bump
Browse files Browse the repository at this point in the history
  • Loading branch information
BitHighlander committed Dec 17, 2024
1 parent bdbec9f commit 0c38152
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
10 changes: 5 additions & 5 deletions __tests__/test-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ let run_test = async function () {
console.log("CLUBMOON Token Balance:", tokenBalance)

// get NFTs
let nfts = await wallet.getNfts("solana:mainnet")
console.log("NFT Count:", nfts.length)
nfts.forEach((nft, i) => {
console.log(`NFT #${i+1}: ${nft.name} (${nft.address.toBase58()})`)
})
// let nfts = await wallet.getNfts("solana:mainnet")
// console.log("NFT Count:", nfts.length)
// nfts.forEach((nft, i) => {
// console.log(`NFT #${i+1}: ${nft.name} (${nft.address.toBase58()})`)
// })

// Uncomment if you want to send SOL (ensure you have enough balance!)
// let sendSolTx = await wallet.sendSol("5RU2erdSLHU8oVEFVK82KCoTSpZt7a6J6gyXcfRVUj5v", 0.0001, "solana:mainnet")
Expand Down
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.0",
"version": "0.1.2",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand All @@ -19,11 +19,6 @@
"size": "size-limit",
"analyze": "size-limit --why"
},
"husky": {
"hooks": {
"pre-commit": "tsdx lint"
}
},
"prettier": {
"printWidth": 80,
"semi": true,
Expand Down
7 changes: 5 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,14 @@ export default class SolanaLib {
}

private getConnection(chainId: string = 'solana:mainnet'): any {
let rpc = SOLANA_MAINNET_CHAINS[chainId]?.rpc || SOLANA_MAINNET_CHAINS['solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp'].rpc
//let rpc = SOLANA_MAINNET_CHAINS[chainId]?.rpc || SOLANA_MAINNET_CHAINS['solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp'].rpc
let rpc = null
if (!rpc) {
// rpc = 'https://solana-api.projectserum.com'
rpc = 'https://ssc-dao.genesysgo.net'
// rpc = 'https://ssc-dao.genesysgo.net'
rpc = 'https://mainnet.helius-rpc.com/?api-key=25862a51-16e5-483f-aafc-e804084e8925'
// rpc = 'https://rpc.magicblock.app/mainnet'
// rpc = 'https://node1.bundlr.network'
}
return new Connection(rpc, 'confirmed')
}
Expand Down

0 comments on commit 0c38152

Please sign in to comment.