Skip to content

Commit

Permalink
Fix bitshares#1349: Use new get_all_workers API call via the bitshare…
Browse files Browse the repository at this point in the history
…sjs ChainStore
  • Loading branch information
svk31 committed Mar 22, 2018
1 parent 7a350f0 commit acd83b2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
13 changes: 5 additions & 8 deletions app/components/Account/AccountVoting.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class AccountVoting extends React.Component {

componentWillMount() {
accountUtils.getFinalFeeAsset(this.props.account, "account_update");
ChainStore.fetchAllWorkers();
this.getBudgetObject();
}

Expand Down Expand Up @@ -478,14 +479,10 @@ class AccountVoting extends React.Component {
_getWorkerArray() {
let workerArray = [];

for (let i = 0; i < 100; i++) {
let id = "1.14." + i;
let worker = ChainStore.getObject(id, false, false);
if (worker === null) {
break;
}
workerArray.push(worker);
}
ChainStore.workers.forEach(workerId => {
let worker = ChainStore.getObject(workerId, false, false);
if (worker) workerArray.push(worker);
});

return workerArray;
}
Expand Down
9 changes: 4 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"alt-container": "^1.0.0",
"alt-react": "0.0.1",
"bignumber.js": "^4.0.0",
"bitsharesjs": "^1.5.2",
"bitsharesjs": "^1.5.3",
"browser-locale": "^1.0.3",
"classnames": "^2.2.1",
"cookies-js": "^1.2.1",
Expand Down

0 comments on commit acd83b2

Please sign in to comment.