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
7 changes: 6 additions & 1 deletion modules/sdk-core/src/bitgo/staking/stakingWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ export class StakingWallet implements IStakingWallet {
);
}

private isStx() {
return this.wallet.baseCoin.getFamily() === 'stx';
}

private isTrxStaking(transaction: StakingTransaction) {
return this.wallet.baseCoin.getFamily() === 'trx';
}
Expand Down Expand Up @@ -448,7 +452,8 @@ export class StakingWallet implements IStakingWallet {
if (
buildParams?.type &&
(explainedTransaction as any).type !== undefined &&
TransactionType[buildParams.type] !== (explainedTransaction as any).type
((this.isStx() && TransactionType.ContractCall !== (explainedTransaction as any).type) || // for STX the tx type should always ContractCall
(!this.isStx() && TransactionType[buildParams.type] !== (explainedTransaction as any).type))
) {
mismatchErrors.push(
`Transaction type mismatch. Expected: '${buildParams.type}', Got: '${(explainedTransaction as any).type}'`
Expand Down