Skip to content

Commit

Permalink
compare using BN (#303)
Browse files Browse the repository at this point in the history
* compare using BN

* 1.0.2 - release fix
  • Loading branch information
ngmachado authored Mar 27, 2024
1 parent f89c406 commit 78cf112
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "superfluid-sentinel",
"version": "1.0.1",
"version": "1.0.2",
"description": "Superfluid Sentinel",
"main": "main.js",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion src/protocol/protocol.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 78cf112

Please sign in to comment.