From 78cf112daeded8e6682174d3d36ee10683ab5d5b Mon Sep 17 00:00:00 2001 From: Axe Date: Wed, 27 Mar 2024 17:43:52 +0000 Subject: [PATCH] compare using BN (#303) * compare using BN * 1.0.2 - release fix --- package.json | 2 +- src/protocol/protocol.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1bf8ecf9..03af1114 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "superfluid-sentinel", - "version": "1.0.1", + "version": "1.0.2", "description": "Superfluid Sentinel", "main": "main.js", "scripts": { diff --git a/src/protocol/protocol.js b/src/protocol/protocol.js index d8ae3448..5b4ffea2 100644 --- a/src/protocol/protocol.js +++ b/src/protocol/protocol.js @@ -125,7 +125,8 @@ class Protocol { try { this.app.client.addTotalRequest(); const result = await this.app.client.contracts.CFAv1.methods.getFlow(superToken, sender, receiver).call(); - if (result.flowRate !== "0") { + const flowRate = new BN(result.flowRate); + if (!flowRate.eq(new BN(0))) { return result; } } catch (err) {