Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

Commit

Permalink
remove reserves fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Hammad-Mubeen committed Feb 14, 2022
1 parent 26474a2 commit be0a21f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routes/listenerroutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var pairModel = require("../models/pair");
var hashesofpairsModel = require("../models/hashesofpairs");
var eventsModel = require("../models/events");
var pairagainstuser = require("../models/pairagainstuser");
var pair = require("../JsClients/PAIR/test/installed.ts");
var paircontract = require("../JsClients/PAIR/test/installed.ts");

function splitdata(data) {
var temp = data.split("(");
Expand Down Expand Up @@ -727,7 +727,7 @@ router.route("/geteventsdata").post(async function (req, res, next) {
message: "There is no pair against this user to remove reserves.",
});
} else {
let liquidity = await pair.balanceOf(
let liquidity = await paircontract.balanceOf(
pairagainstuserresult.pair,
pairagainstuserresult.id.toLowerCase()
);
Expand Down
2 changes: 2 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,5 @@
// pairagainstuserresult.reserve1 = args.amount1;
// await pairagainstuserresult.save();
// }
console.log(BigInt(31627572002)-BigInt(7906866420));
console.log(BigInt(299999)-BigInt(74999));

0 comments on commit be0a21f

Please sign in to comment.