Add stopPolling method
This commit is contained in:
parent
5e4369da27
commit
926e10da01
1 changed files with 7 additions and 2 deletions
|
|
@ -146,8 +146,13 @@ Trader.prototype.startPolling = function () {
|
|||
this.pollBalance();
|
||||
this.pollRate();
|
||||
|
||||
setInterval(this.pollBalance.bind(this), 60 * 1000);
|
||||
setInterval(this.pollRate.bind(this), 60 * 1000);
|
||||
this.balanceInterval = setInterval(this.pollBalance.bind(this), 60 * 1000);
|
||||
this.rateInterval = setInterval(this.pollRate.bind(this), 60 * 1000);
|
||||
};
|
||||
|
||||
Trader.prototype.stopPolling = function () {
|
||||
clearInterval(this.balanceInterval);
|
||||
clearInterval(this.rateInterval);
|
||||
};
|
||||
|
||||
Trader.prototype.pollBalance = function () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue