Skip to content

Commit 172bb3c

Browse files
authored
Merge pull request #54 from hyperweb-io/solana-interchain-kit
Solana interchain kit
2 parents 23f48d8 + e0928e0 commit 172bb3c

File tree

4 files changed

+1632
-1404
lines changed

4 files changed

+1632
-1404
lines changed

examples/solana/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@
1010
},
1111
"dependencies": {
1212
"@chain-registry/v2": "^1.71.237",
13-
"@interchain-kit/core": "0.3.43",
14-
"@interchain-kit/phantom-extension": "0.3.43",
15-
"@interchain-kit/react": "0.3.43",
13+
"@interchain-kit/phantom-extension": "0.3.46",
14+
"@interchain-kit/react": "0.3.46",
1615
"@interchain-ui/react": "1.26.3",
17-
"@interchainjs/solana": "1.16.1",
16+
"@interchainjs/solana": "1.17.3",
1817
"chain-registry": "2.0.31",
1918
"next": "15.3.5",
2019
"react": "^19.0.0",

examples/solana/src/app/page.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
} from '@interchainjs/solana';
1313
import { useChain, useWalletManager } from '@interchain-kit/react';
1414

15-
type StatusContent = ReactNode;
15+
type StatusContent = string | ReactNode;
1616

1717
export default function Home() {
1818
const [client, setClient] = useState<PhantomSigningClient | null>(null);
@@ -57,19 +57,22 @@ export default function Home() {
5757
setLoading(true);
5858
setStatus('Connecting to Phantom wallet...');
5959

60+
// console.log('wallet 2', wallet)
61+
const provider = await wallet.getProvider()
62+
// console.log('provider', provider)
63+
// setClient(provider)
64+
6065
const newClient = await PhantomSigningClient.connectWithPhantom(
6166
DEVNET_ENDPOINT,
6267
{
6368
commitment: 'confirmed',
64-
broadcast: { checkTx: true, timeout: 60000 }
65-
}
69+
broadcast: { checkTx: true, timeout: 60000 },
70+
provider
71+
},
6672
);
6773

6874
setClient(newClient); // original
69-
// console.log('wallet 2', wallet)
70-
// const provider = await wallet.getProvider()
71-
// console.log('provider', provider)
72-
// setClient(provider)
75+
7376
const walletAddress = newClient.signerAddress.toString();
7477
setWalletAddress(walletAddress);
7578
setRecipient(walletAddress);
@@ -349,7 +352,7 @@ export default function Home() {
349352
<h2 className="text-lg font-semibold text-gray-700 mb-3">Status</h2>
350353
<div className="bg-gray-50 p-3 rounded min-h-[60px]">
351354
<p className="text-sm text-gray-700">
352-
{loading ? 'Loading...' : status || 'Ready to use'}
355+
{loading ? 'Loading...' : (status ? status : 'Ready to use')}
353356
</p>
354357
</div>
355358
</div>

packages/create-interchain-app/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"build:chmod": "chmod +x ./dist/create-interchain-app.js",
2626
"build": "npm run build:clean && npm run build:dist && npm run build:copy && npm run build:chmod",
2727
"build:win": "npm run build:clean && npm run build:dist && npm run build:copy",
28-
"prepare": "npm run build",
2928
"dev": "node ./dist/create-interchain-app",
3029
"lint": "eslint .",
3130
"format": "eslint --fix .",

0 commit comments

Comments
 (0)