aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/blockchain.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-01-18 23:18:25 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-01-18 23:18:25 +0800
commit614ea14a7fe90252d2bef8a97b3c376ae4498a17 (patch)
tree09051098c9ecf1c98f29d0de4aeee4af31d41bda /packages/website/ts/blockchain.ts
parentce45f9900618958d9cb71cb71a32446021698ee6 (diff)
downloaddexon-sol-tools-614ea14a7fe90252d2bef8a97b3c376ae4498a17.tar.gz
dexon-sol-tools-614ea14a7fe90252d2bef8a97b3c376ae4498a17.tar.zst
dexon-sol-tools-614ea14a7fe90252d2bef8a97b3c376ae4498a17.zip
Fix prettier
Diffstat (limited to 'packages/website/ts/blockchain.ts')
-rw-r--r--packages/website/ts/blockchain.ts24
1 files changed, 14 insertions, 10 deletions
diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts
index 66f982427..5530701c0 100644
--- a/packages/website/ts/blockchain.ts
+++ b/packages/website/ts/blockchain.ts
@@ -368,18 +368,22 @@ export class Blockchain {
const [currBalance] = await this.getTokenBalanceAndAllowanceAsync(this._userAddress, token.address);
- this._zrxPollIntervalId = intervalUtils.setAsyncExcludingInterval(async () => {
- const [balance] = await this.getTokenBalanceAndAllowanceAsync(this._userAddress, token.address);
- if (!balance.eq(currBalance)) {
- this._dispatcher.replaceTokenBalanceByAddress(token.address, balance);
+ this._zrxPollIntervalId = intervalUtils.setAsyncExcludingInterval(
+ async () => {
+ const [balance] = await this.getTokenBalanceAndAllowanceAsync(this._userAddress, token.address);
+ if (!balance.eq(currBalance)) {
+ this._dispatcher.replaceTokenBalanceByAddress(token.address, balance);
+ intervalUtils.clearAsyncExcludingInterval(this._zrxPollIntervalId);
+ delete this._zrxPollIntervalId;
+ }
+ },
+ 5000,
+ (err: Error) => {
+ utils.consoleLog(`Polling tokenBalance failed: ${err}`);
intervalUtils.clearAsyncExcludingInterval(this._zrxPollIntervalId);
delete this._zrxPollIntervalId;
- }
- }, 5000, (err: Error) => {
- utils.consoleLog(`Polling tokenBalance failed: ${err}`);
- intervalUtils.clearAsyncExcludingInterval(this._zrxPollIntervalId);
- delete this._zrxPollIntervalId;
- });
+ },
+ );
}
public async signOrderHashAsync(orderHash: string): Promise<SignatureData> {
utils.assert(!_.isUndefined(this._zeroEx), 'ZeroEx must be instantiated.');