Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions modules/sdk-core/src/bitgo/wallet/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2407,7 +2407,15 @@ export class Wallet implements IWallet {
'transaction params:',
_.omit(params, ['keychain', 'prv', 'passphrase', 'walletPassphrase', 'key', 'wallet'])
);
console.error('transaction prebuild:', txPrebuild);
// Sanitize to remove _token from bitgo
const sanitizedPrebuild = {
..._.omit(txPrebuild, ['wallet']),
wallet: {
...this,
bitgo: _.omit(this.bitgo, ['_token']),
},
};
console.error('transaction prebuild:', sanitizedPrebuild);
console.trace(e);
throw e;
}
Expand Down Expand Up @@ -2449,7 +2457,13 @@ export class Wallet implements IWallet {
confirmedBalance: this.confirmedBalance(),
spendableBalance: this.spendableBalance(),
};
error.txParams = _.omit(params, ['keychain', 'prv', 'passphrase', 'walletPassphrase', 'key']);
error.txParams = {
..._.omit(params, ['keychain', 'prv', 'passphrase', 'walletPassphrase', 'key', 'wallet']),
wallet: {
...this,
bitgo: _.omit(this.bitgo, ['_token']),
},
};
}
throw error;
}
Expand Down
Loading