From 9ab0870e406cafeb661212fb49fa2ef407aa0ff0 Mon Sep 17 00:00:00 2001 From: cdlgz <34324044+cdlgz@users.noreply.github.com> Date: Fri, 18 Jan 2019 16:51:07 +0800 Subject: [PATCH] Update ST20Generator.js The parameters of the allowance function is incorrect --- CLI/commands/ST20Generator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLI/commands/ST20Generator.js b/CLI/commands/ST20Generator.js index 689b2b27f..e293bf19d 100644 --- a/CLI/commands/ST20Generator.js +++ b/CLI/commands/ST20Generator.js @@ -187,7 +187,7 @@ async function approvePoly(spender, fee) { polyBalance = await polyToken.methods.balanceOf(Issuer.address).call(); let requiredAmount = web3.utils.toWei(fee.toString(), "ether"); if (parseInt(polyBalance) >= parseInt(requiredAmount)) { - let allowance = await polyToken.methods.allowance(spender, Issuer.address).call(); + let allowance = await polyToken.methods.allowance(Issuer.address, spender).call(); if (allowance == web3.utils.toWei(fee.toString(), "ether")) { return true; } else {