aboutsummaryrefslogtreecommitdiffstats
path: root/src/contract_wrappers/token_wrapper.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/contract_wrappers/token_wrapper.ts')
-rw-r--r--src/contract_wrappers/token_wrapper.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/contract_wrappers/token_wrapper.ts b/src/contract_wrappers/token_wrapper.ts
index cedbfbdae..69bcc9024 100644
--- a/src/contract_wrappers/token_wrapper.ts
+++ b/src/contract_wrappers/token_wrapper.ts
@@ -28,8 +28,7 @@ export class TokenWrapper extends ContractWrapper {
const tokenContract = await this.getTokenContractAsync(tokenAddress);
let balance = await tokenContract.balanceOf.call(ownerAddress);
- // The BigNumber instance returned by Web3 is of a much older version then our own, we therefore
- // should always re-instantiate the returned BigNumber after retrieval.
+ // Wrap BigNumbers returned from web3 with our own (later) version of BigNumber
balance = new BigNumber(balance);
return balance;
}
@@ -44,6 +43,7 @@ export class TokenWrapper extends ContractWrapper {
const tokenContract = await this.getTokenContractAsync(tokenAddress);
const proxyAddress = await this.getProxyAddressAsync();
let allowanceInBaseUnits = await tokenContract.allowance.call(ownerAddress, proxyAddress);
+ // Wrap BigNumbers returned from web3 with our own (later) version of BigNumber
allowanceInBaseUnits = new BigNumber(allowanceInBaseUnits);
return allowanceInBaseUnits;
}