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;
} else {
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