File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -84,26 +84,26 @@ export async function getWalletAndSigningKeychain({
8484 KeyIndices : { USER : number ; BACKUP : number ; BITGO : number } ;
8585} ) {
8686 const baseCoin = bitgo . coin ( coin ) ;
87-
87+
8888 const wallet = await baseCoin . wallets ( ) . get ( { id : walletId , reqId } ) ;
89-
89+
9090 if ( ! wallet ) {
9191 throw new Error ( `Wallet ${ walletId } not found` ) ;
9292 }
93-
93+
9494 const keyIdIndex = params . source === 'user' ? KeyIndices . USER : KeyIndices . BACKUP ;
9595 const signingKeychain = await baseCoin . keychains ( ) . get ( {
9696 id : wallet . keyIds ( ) [ keyIdIndex ] ,
9797 } ) ;
98-
98+
9999 if ( ! signingKeychain || ! signingKeychain . pub ) {
100100 throw new Error ( `Signing keychain for ${ params . source } not found` ) ;
101101 }
102-
102+
103103 if ( params . pubkey && params . pubkey !== signingKeychain . pub ) {
104104 throw new Error ( `Pub provided does not match the keychain on wallet for ${ params . source } ` ) ;
105105 }
106-
106+
107107 return { baseCoin, wallet, signingKeychain } ;
108108}
109109
You can’t perform that action at this time.
0 commit comments