Skip to content

Commit 445efe6

Browse files
committed
fixed the bug that new version of interchain-kit changed the new method to get cosmso wallet
1 parent b5a8c79 commit 445efe6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

templates/chain-template/pages/sign-message.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@ export default function SignMessage() {
5353
}
5454

5555
if (!(wallet instanceof ExtensionWallet)) {
56+
console.log('wallet', wallet, chain.chainType);
5657
return
5758
}
5859

5960
try {
6061
setSigningIn(true);
61-
62-
const cosmosWallet = wallet.getWalletByChainType('cosmos') as CosmosWallet;
62+
const cosmosWallet = wallet.getWalletOfType(CosmosWallet)
6363

6464
// Sign the message
65-
const result = await cosmosWallet.signArbitrary(chain.chainId, address, message);
65+
const result = await cosmosWallet!.signArbitrary(chain.chainId, address, message);
6666

6767
// Get the public key
6868
const account = await wallet?.getAccount(chain.chainId);

0 commit comments

Comments
 (0)