@@ -12,6 +12,7 @@ import { IMPORT_IN_C } from '../resources/transactionData/importInC';
1212import {
1313 MULTISIG_DELEGATION_FULLY_SIGNED_TX_HEX ,
1414 MULTISIG_DELEGATION_PARAMS ,
15+ MPC_DELEGATION_UNSIGNED_TX_HEX ,
1516} from '../resources/transactionData/multisigDelegationTx' ;
1617import { HalfSignedAccountTransaction , TransactionType , MPCAlgorithm } from '@bitgo/sdk-core' ;
1718import { secp256k1 } from '@flarenetwork/flarejs' ;
@@ -978,6 +979,22 @@ describe('Flrp test cases', function () {
978979 const isVerified = await basecoin . verifyTransaction ( { txParams, txPrebuild } ) ;
979980 isVerified . should . equal ( true ) ;
980981 } ) ;
982+
983+ it ( 'should verify delegation transaction when txParams.type is undefined (MPC intent flow)' , async ( ) => {
984+ // In the MPC/TSS staking flow, the txRequest is created by staking-service (not the UI).
985+ // The UI only has txRequestId — no buildParams. The SDK falls back to { recipients: [] }
986+ // with no type and no stakingOptions. verifyTransaction must still pass because the
987+ // parsed hex (explainedTx.type) is the source of truth built by wallet-platform.
988+ const txPrebuild = { txHex : MPC_DELEGATION_UNSIGNED_TX_HEX , txInfo : { } } ;
989+ const txParams = {
990+ recipients : [ ] ,
991+ // no type — simulates MPC staking flow where buildParams is unavailable
992+ // no stakingOptions — not passed through in the MPC intent flow
993+ } ;
994+
995+ const isVerified = await basecoin . verifyTransaction ( { txParams, txPrebuild } ) ;
996+ isVerified . should . equal ( true ) ;
997+ } ) ;
981998 } ) ;
982999
9831000 describe ( 'verifyTransaction with TSS wallet (Avalanche atomic)' , ( ) => {
0 commit comments