Skip to content

Commit ec54517

Browse files
committed
fix(sdk-core): skip STX stake related tx
TICKET: SC-3504
1 parent 5821b1e commit ec54517

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

modules/sdk-core/src/bitgo/staking/stakingWallet.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,12 @@ export class StakingWallet implements IStakingWallet {
289289
// default to verifying a transaction unless explicitly skipped
290290
// skipping the verification for btc undelegate because it is just single sig
291291
// TODO: SC-3183 (add trx staking verification)
292+
// TODO: SC-3508 (add STX staking verification)
292293
const skipVerification =
293294
(signOptions.transactionVerificationOptions?.skipTransactionVerification ||
294295
this.isBtcUndelegate(transaction) ||
295-
this.isTrxStaking(transaction)) ??
296+
this.isTrxStaking(transaction) ||
297+
this.isStx()) ??
296298
false;
297299
if (!isStakingTxRequestPrebuildResult(builtTx.result) && !skipVerification) {
298300
await this.validateBuiltStakingTransaction(builtTx.transaction, builtTx);
@@ -452,8 +454,7 @@ export class StakingWallet implements IStakingWallet {
452454
if (
453455
buildParams?.type &&
454456
(explainedTransaction as any).type !== undefined &&
455-
((this.isStx() && TransactionType.ContractCall !== (explainedTransaction as any).type) || // for STX the tx type should always ContractCall
456-
(!this.isStx() && TransactionType[buildParams.type] !== (explainedTransaction as any).type))
457+
TransactionType[buildParams.type] !== (explainedTransaction as any).type
457458
) {
458459
mismatchErrors.push(
459460
`Transaction type mismatch. Expected: '${buildParams.type}', Got: '${(explainedTransaction as any).type}'`

0 commit comments

Comments
 (0)