File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
modules/sdk-core/src/bitgo Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -178,15 +178,20 @@ export class StakingWallet implements IStakingWallet {
178178 stakingPrebuildTransaction : StakingPrebuildTransactionResult
179179 ) : Promise < StakingSignedTransaction > {
180180 const reqId = new RequestTracer ( ) ;
181- const keychain = await this . wallet . baseCoin . keychains ( ) . getKeysForSigning ( {
181+ const isBtcUndelegate =
182+ this . wallet . baseCoin . getFamily ( ) === 'btc' &&
183+ stakingPrebuildTransaction . transaction . transactionType . toLowerCase ( ) === 'undelegate_withdraw' ;
184+ const wallet = isBtcUndelegate
185+ ? await this . getDescriptorWallet ( stakingPrebuildTransaction . transaction )
186+ : await this . getWalletForBuildingAndSigning ( ) ;
187+
188+ const keychain = await wallet . baseCoin . keychains ( ) . getKeysForSigning ( {
182189 wallet : this . wallet ,
183190 reqId : reqId ,
184191 } ) ;
185192 return {
186193 transaction : stakingPrebuildTransaction . transaction ,
187- signed : await (
188- await this . getWalletForBuildingAndSigning ( )
189- ) . signTransaction ( {
194+ signed : await wallet . signTransaction ( {
190195 txPrebuild : stakingPrebuildTransaction . result ,
191196 walletPassphrase : signOptions . walletPassphrase ,
192197 keychain : keychain [ 0 ] ,
Original file line number Diff line number Diff line change @@ -1936,6 +1936,7 @@ export class Wallet implements IWallet {
19361936 return this . baseCoin . signTransaction ( {
19371937 ...signTransactionParams ,
19381938 prv : this . getUserPrv ( presign as GetUserPrvOptions ) ,
1939+ wallet : this ,
19391940 } ) ;
19401941 }
19411942
You can’t perform that action at this time.
0 commit comments