Skip to content

Commit

Permalink
Merge pull request #160 from singnet/development
Browse files Browse the repository at this point in the history
fixed types of data in _fundEscrowAccount
  • Loading branch information
MarinaFedy authored Feb 20, 2025
2 parents f37e2ff + 331d5cf commit a1ca9f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/core/src/MPEContract.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,10 @@ class MPEContract {
async _fundEscrowAccount(account, amountInCogs) {
const address = await account.getAddress();
let currentEscrowBalance = await this.balance(address);
currentEscrowBalance = toBNString(currentEscrowBalance);
amountInCogs = toBNString(amountInCogs);
if(amountInCogs > currentEscrowBalance) {
await account.depositToEscrowAccount(amountInCogs - currentEscrowBalance);
currentEscrowBalance = new BigNumber(currentEscrowBalance);
amountInCogs = new BigNumber(amountInCogs);
if(amountInCogs.isGreaterThan(currentEscrowBalance)) {
await account.depositToEscrowAccount(amountInCogs.minus(currentEscrowBalance));
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "snet-sdk-web",
"version": "4.1.1",
"version": "4.1.2",
"description": "SingularityNET SDK for Web",
"main": "./dist/index.js",
"files": [
Expand Down

0 comments on commit a1ca9f5

Please sign in to comment.