BugFix: consumeAsset - not working when using entire coin

This commit is contained in:
sairajzero 2022-02-24 17:59:09 +05:30
parent 2e209372a3
commit f9f89d91d3

View File

@ -48,7 +48,7 @@ const consumeAsset = (floID, asset, amount, txQueries = []) => new Promise((reso
rem = 0; rem = 0;
} else { } else {
txQueries.push(["DELETE FROM Vault WHERE id=?", [coins[i].id]]); txQueries.push(["DELETE FROM Vault WHERE id=?", [coins[i].id]]);
rem -= result[i].quantity; rem -= coins[i].quantity;
} }
} }
if (rem > 0) //should not happen AS the total and net is checked already if (rem > 0) //should not happen AS the total and net is checked already