File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,8 @@ const checkAndRedeemMessage = async (l1ToL2Message: L1ToL2MessageWriter) => {
41
41
logger . info ( `Transfer successful: ${ l2TxHash } ` )
42
42
}
43
43
44
+ const ifNotNullToBN = ( val : string | null ) => ( val == null ? val : toBN ( val ) )
45
+
44
46
export const sendToL2 = async ( cli : CLIEnvironment , cliArgs : CLIArgs ) : Promise < void > => {
45
47
logger . info ( `>>> Sending tokens to L2 <<<\n` )
46
48
@@ -172,9 +174,9 @@ export const sendToL2Command = {
172
174
description : 'Calldata to pass to the recipient. Must be allowlisted in the bridge' ,
173
175
} )
174
176
. coerce ( {
175
- maxGas : toBN ,
176
- gasPriceBid : toBN ,
177
- maxSubmissionCost : toBN ,
177
+ maxGas : ifNotNullToBN ,
178
+ gasPriceBid : ifNotNullToBN ,
179
+ maxSubmissionCost : ifNotNullToBN ,
178
180
} )
179
181
} ,
180
182
handler : async ( argv : CLIArgs ) : Promise < void > => {
You can’t perform that action at this time.
0 commit comments