Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
0xp3gasus committed Sep 4, 2024
1 parent cdab945 commit b4b787f
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 20 deletions.
17 changes: 8 additions & 9 deletions examples/solana/.codesandbox/tasks.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
// These tasks will run in order when initializing your CodeSandbox project.
"setupTasks": [
{
"name": "Install Dependencies",
"command": "yarn install"
}
]
}

// These tasks will run in order when initializing your CodeSandbox project.
"setupTasks": [
{
"name": "Install Dependencies",
"command": "yarn install"
}
]
}
3 changes: 1 addition & 2 deletions examples/solana/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"name": "Devcontainer",
"image": "ghcr.io/codesandbox/devcontainers/typescript-node:latest"
}

}
2 changes: 1 addition & 1 deletion examples/solana/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
"ts-node": "10.9.2",
"typescript": "^5.0.4"
}
}
}
9 changes: 7 additions & 2 deletions examples/solana/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
{
"compilerOptions": {
"module":"commonjs",
"module": "commonjs",
"target": "es5",
"noEmitOnError": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"lib": ["es6", "dom", "es2016", "es2017"]
"lib": [
"es6",
"dom",
"es2016",
"es2017"
]
}
}
11 changes: 5 additions & 6 deletions packages/xchain-solana/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ import { Cluster } from '@solana/web3.js'
import { Network } from '@xchainjs/xchain-client'

export const getSolanaNetwork = (network: Network): Cluster => {
switch (network) {
case Network.Mainnet:
case Network.Stagenet:
return 'mainnet-beta'
case Network.Testnet:
return 'testnet'
const networkMap: { [key in Network]: Cluster } = {
[Network.Mainnet]: 'mainnet-beta',
[Network.Stagenet]: 'mainnet-beta',
[Network.Testnet]: 'testnet',
}
return networkMap[network]
}

0 comments on commit b4b787f

Please sign in to comment.