File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1300,6 +1300,22 @@ describe('V2 Wallet:', function () {
13001300
13011301 response . isDone ( ) . should . be . true ( ) ;
13021302 } ) ;
1303+
1304+ it ( 'should pass gas limit parameter through when building transaction for sui' , async function ( ) {
1305+ const params = { gasLimit : 100 } ;
1306+ const path = `/api/v2/${ wallet . coin ( ) } /wallet/${ wallet . id ( ) } /tx/build` ;
1307+ const response = nock ( bgUrl )
1308+ . post ( path , _ . matches ( params ) ) // use _.matches to do a partial match on request body object instead of strict matching
1309+ . reply ( 200 ) ;
1310+ try {
1311+ await wallet . prebuildTransaction ( params ) ;
1312+ } catch ( e ) {
1313+ // the prebuildTransaction method will probably throw an exception for not having all of the correct nocks
1314+ // we only care about /tx/build and whether reservation is an allowed parameter
1315+ }
1316+
1317+ response . isDone ( ) . should . be . true ( ) ;
1318+ } ) ;
13031319 } ) ;
13041320
13051321 describe ( 'Maximum Spendable' , function maximumSpendable ( ) {
Original file line number Diff line number Diff line change @@ -161,6 +161,16 @@ export abstract class MpcUtils {
161161 }
162162 }
163163
164+ if ( params . feeOptions !== undefined ) {
165+ return {
166+ ...baseIntent ,
167+ memo : params . memo ?. value ,
168+ token : params . tokenName ,
169+ enableTokens : params . enableTokens ,
170+ feeOptions : params . feeOptions ,
171+ } ;
172+ }
173+
164174 return {
165175 ...baseIntent ,
166176 memo : params . memo ?. value ,
Original file line number Diff line number Diff line change @@ -2554,6 +2554,8 @@ export class Wallet implements IWallet {
25542554 maxPriorityFeePerGas : Number ( params . eip1559 ?. maxPriorityFeePerGas ) ,
25552555 gasLimit : params . gasLimit ,
25562556 } ;
2557+ } else if ( params . gasLimit !== undefined ) {
2558+ feeOptions = { gasLimit : params . gasLimit } ;
25572559 } else {
25582560 feeOptions = undefined ;
25592561 }
You can’t perform that action at this time.
0 commit comments