LiskArchive / lisk-ui

🖥️ Lisk user-interface submodule
https://lisk.io/
GNU General Public License v3.0
24 stars 35 forks source link

Fixing balance updates by limiting the calls the GUI does to 1 - Fixes #53 #113

Closed toschdev closed 7 years ago

toschdev commented 7 years ago

The problem was that each usage of "updateControllerData" assigned one

$scope.updateAppView();

to the angular listener. Leading to several updateAppView functions being called after several loads of the Dashboard. By using:

$scope.$$listeners.updateControllerData.splice(1);

I am limiting the current API call set to 1, therefore still allowing it to be there but not several instances. This is especially important because the updateAppView does:

getAccount getTransactions getDelegate

API calls, which can be consuming especially for much used accounts.