File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
packages/transaction-controller/src/utils Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -810,6 +810,33 @@ describe('Batch Utils', () => {
810810 } ,
811811 ) ;
812812
813+ it . each ( [ true , false ] ) (
814+ 'passes isGasFeeSponsored flag (%s) through to addTransaction when provided (EIP-7702 path)' ,
815+ async ( isGasFeeSponsored ) => {
816+ isAccountUpgradedToEIP7702Mock . mockResolvedValueOnce ( {
817+ delegationAddress : undefined ,
818+ isSupported : true ,
819+ } ) ;
820+
821+ addTransactionMock . mockResolvedValueOnce ( {
822+ transactionMeta : TRANSACTION_META_MOCK ,
823+ result : Promise . resolve ( '' ) ,
824+ } ) ;
825+
826+ request . request . isGasFeeSponsored = isGasFeeSponsored ;
827+
828+ await addTransactionBatch ( request ) ;
829+
830+ expect ( addTransactionMock ) . toHaveBeenCalledTimes ( 1 ) ;
831+ expect ( addTransactionMock ) . toHaveBeenCalledWith (
832+ expect . any ( Object ) ,
833+ expect . objectContaining ( {
834+ isGasFeeSponsored,
835+ } ) ,
836+ ) ;
837+ } ,
838+ ) ;
839+
813840 describe ( 'validates security' , ( ) => {
814841 it ( 'using transaction params' , async ( ) => {
815842 isAccountUpgradedToEIP7702Mock . mockResolvedValueOnce ( {
You can’t perform that action at this time.
0 commit comments