File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff 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 >
Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff line change 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" ,
6262 "ts-jest" : " ^29.3.0"
6363 },
6464 "gitHead" : " 625f04af4fe4e4107d371acf0b1fc5454b2af0e5"
65- }
65+ }
You can’t perform that action at this time.
0 commit comments