From a5bd104c71afc9550ae8fa503e28f600dd5280c3 Mon Sep 17 00:00:00 2001 From: gzeon <95478735+gzeoneth@users.noreply.github.com> Date: Sat, 11 Jun 2022 04:30:55 +0800 Subject: [PATCH] fix: use BigNumber gte instead of >= (#76) --- package.json | 2 +- src/lib/assetBridger/ethBridger.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d6035ed347..b37765a01c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@arbitrum/sdk", - "version": "1.1.6", + "version": "1.1.7", "description": "Typescript library client-side interactions with Arbitrum", "author": "Offchain Labs, Inc.", "license": "Apache-2.0", diff --git a/src/lib/assetBridger/ethBridger.ts b/src/lib/assetBridger/ethBridger.ts index 866a6f32ef..b233d9059c 100644 --- a/src/lib/assetBridger/ethBridger.ts +++ b/src/lib/assetBridger/ethBridger.ts @@ -127,7 +127,7 @@ export class EthBridger extends AssetBridger< // We could alternatively set the submission price to zero here and use the refunds instead, but that // would be confusing for users tracking activity in block explorers. // This is fixed with nitro's new depositEth message - if (submissionPrice >= params.amount) + if (submissionPrice.gte(params.amount)) throw new ArbSdkError('Not enough amount for submission cost') const inbox = Inbox__factory.connect(