Skip to content

Commit

Permalink
improve getAccoutData speed
Browse files Browse the repository at this point in the history
  • Loading branch information
avihaiandroid committed Feb 24, 2018
1 parent 3767e0a commit 08e9e1b
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 15 deletions.
4 changes: 2 additions & 2 deletions work_place/models/layout/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function LayoutController($scope, $http, $state, $timeout, $rootScope, $mdSidena
if (msg.data.error) {
console.error('getAccountData error', msg.data.error);
} else {
console.log('getAccountData success', msg.data.success);
msg.data.success = JSON.parse(msg.data.success).data;
$rootScope.accountData = msg.data.success;
$rootScope.accountData.miBalance = iota.utils.convertUnits($rootScope.accountData.balance, 'i', 'Mi');
localStorage.setItem('AccountData', JSON.stringify(msg.data.success));
Expand All @@ -46,7 +46,7 @@ function LayoutController($scope, $http, $state, $timeout, $rootScope, $mdSidena
if (msg.data.error) {
console.error('getAccountData error', msg.data.error);
} else {
console.log('getAccountData success', msg.data.success);
msg.data.success = JSON.parse(msg.data.success).data;
$rootScope.accountData = msg.data.success;
$rootScope.accountData.miBalance = iota.utils.convertUnits($rootScope.accountData.balance, 'i', 'Mi');
localStorage.setItem('AccountData', JSON.stringify(msg.data.success));
Expand Down
76 changes: 63 additions & 13 deletions work_place/workers/get-account-data.js

Large diffs are not rendered by default.

0 comments on commit 08e9e1b

Please sign in to comment.