Skip to content

Commit

Permalink
Refresh Data Polling Interval
Browse files Browse the repository at this point in the history
  • Loading branch information
vasapower committed Aug 29, 2020
1 parent c354578 commit 4f3b59a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions data/context.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"blockSearchSection" : 9000000,
"deploySearchStart": 9779603,
"deploySearchStartRopsten": 7465062,
"refreshDataPollingInterval" : 10000,
"typeTimeout" : 600,
"defaultCharsAmount" : 90,
"transactionConfirmations": 0,
Expand Down
1 change: 1 addition & 0 deletions spa/stableCoin/controller.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ var StableCoinController = function (view) {
context.view.forceUpdate();
context.loadPairs();
context.loadEconomicData();
context.view.economicDataInterval = context.view.economicDataInterval || setInterval(context.loadEconomicData, window.context.refreshDataPollingInterval);
};

context.loadEconomicData = async function loadEconomicData() {
Expand Down
2 changes: 2 additions & 0 deletions spa/stableCoin/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ var StableCoin = React.createClass({
},
componentWillUnmount() {
delete this.oldStableCoin;
this.economicDataInterval && window.clearInterval(this.economicDataInterval);
delete this.economicDataInterval;
},
onActionChange(e) {
e && e.preventDefault && e.preventDefault(true) && e.stopPropagation && e.stopPropagation(true);
Expand Down

0 comments on commit 4f3b59a

Please sign in to comment.