Skip to content

Commit

Permalink
fix: add wallet type check for sign transaction
Browse files Browse the repository at this point in the history
Ticket: WP-2664

TICKET: WP-2664
  • Loading branch information
margueriteblair committed Sep 16, 2024
1 parent a10dac8 commit ddc04f5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/sdk-core/src/bitgo/wallet/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1831,7 +1831,12 @@ export class Wallet implements IWallet {
params.txPrebuild = { txRequestId };
}

if (params.walletPassphrase && !(params.keychain || params.key)) {
if (
params.walletPassphrase &&
!(params.keychain || params.key) &&
(this.type() === 'hot' || this.type() === undefined)
) {
// this logic should only apply to hot wallets
if (!_.isString(params.walletPassphrase)) {
throw new Error('walletPassphrase must be a string');
}
Expand Down

0 comments on commit ddc04f5

Please sign in to comment.