OSDN Git Service

update the list vote stauts.
[bytom/Byone.git] / src / models / account.js
index 1f92b56..aa5f203 100644 (file)
@@ -50,10 +50,14 @@ account.balance = function(guid) {
       .listAddressUseServer(guid)
       .then(addresses => {
         let balances = []
+        let votes = []
         addresses.forEach(address => {
           if (address.balances != null) {
             balances = balances.concat(address.balances)
           }
+          if (address.votes != null) {
+            votes = votes.concat(address.votes)
+          }
         })
         let obj = {};
 
@@ -78,7 +82,10 @@ account.balance = function(guid) {
           res.push(obj[prop]);
         }
 
-        resolve(res)
+        resolve({
+            balances:res,
+            votes
+          })
       })
       .catch(error => {
         reject(error)