Skip to content

Commit d95d62d

Browse files
change interchain-ui/react to 1.26.1
1 parent 0993673 commit d95d62d

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

packages/core/src/wallets/base-wallet.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ export abstract class BaseWallet {
2525
this.assetLists = assetLists
2626
}
2727
getChainById(chainId: Chain['chainId']): Chain {
28-
return this.chainMap.get(chainId);
28+
const chain = this.chainMap.get(chainId);
29+
if (!chain) {
30+
throw new Error(`Chain ${chainId} not found in wallet ${this.info.name}`)
31+
}
32+
return chain
2933
}
3034
abstract init(): Promise<void>
3135
abstract connect(chainId: Chain['chainId']): Promise<void>

packages/core/src/wallets/cosmos-wallet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export class CosmosWallet extends BaseWallet {
8686
return this.client.sendTx(chainId, tx, mode)
8787
}
8888
async addSuggestChain(chainId: string): Promise<void> {
89-
const chain = this.chainMap.get(chainId)
89+
const chain = this.getChainById(chainId)
9090
const chainInfo = chainRegistryChainToKeplr(chain, this.assetLists)
9191
try {
9292
await this.client.experimentalSuggestChain(chainInfo)

packages/react/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"dependencies": {
3636
"@chain-registry/v2-types": "^0.53.40",
3737
"@interchain-kit/core": "0.2.216",
38-
"@interchain-ui/react": "1.26.3",
38+
"@interchain-ui/react": "1.26.1",
3939
"@interchainjs/cosmos": "1.10.1",
4040
"@interchainjs/cosmos-types": "1.10.1",
4141
"@react-icons/all-files": "^4.1.0",
@@ -62,4 +62,4 @@
6262
"ts-jest": "^29.3.0"
6363
},
6464
"gitHead": "625f04af4fe4e4107d371acf0b1fc5454b2af0e5"
65-
}
65+
}

0 commit comments

Comments
 (0)