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 @@ -40,6 +40,8 @@ const checkAndRedeemMessage = async (l1ToL2Message: L1ToL2MessageWriter) => {
40
40
logger . info ( `Transfer successful: ${ l2TxHash } ` )
41
41
}
42
42
43
+ const ifNotNullToBN = ( val : string | null ) => ( val == null ? val : toBN ( val ) )
44
+
43
45
export const sendToL2 = async ( cli : CLIEnvironment , cliArgs : CLIArgs ) : Promise < void > => {
44
46
logger . info ( `>>> Sending tokens to L2 <<<\n` )
45
47
@@ -168,9 +170,9 @@ export const sendToL2Command = {
168
170
description : 'Calldata to pass to the recipient. Must be allowlisted in the bridge' ,
169
171
} )
170
172
. coerce ( {
171
- maxGas : toBN ,
172
- gasPriceBid : toBN ,
173
- maxSubmissionCost : toBN ,
173
+ maxGas : ifNotNullToBN ,
174
+ gasPriceBid : ifNotNullToBN ,
175
+ maxSubmissionCost : ifNotNullToBN ,
174
176
} )
175
177
} ,
176
178
handler : async ( argv : CLIArgs ) : Promise < void > => {
You can’t perform that action at this time.
0 commit comments