|
|
@ -205,6 +205,7 @@ let WalletUtil = { |
|
|
|
wallet.balance=balance; |
|
|
|
wallet.balancePrice=(balance*rr).toFixed(2); |
|
|
|
wallet.coinList[0].balance=balance |
|
|
|
wallet.coinList[0].balancePrice=wallet.balancePrice |
|
|
|
uni.setStorageSync('wallet', wallet); |
|
|
|
}) |
|
|
|
break; |
|
|
@ -213,6 +214,7 @@ let WalletUtil = { |
|
|
|
wallet.balance=balance; |
|
|
|
wallet.balancePrice=(balance*rr).toFixed(2); |
|
|
|
wallet.coinList[0].balance=balance |
|
|
|
wallet.coinList[0].balancePrice=wallet.balancePrice |
|
|
|
for(let i=1;i<wallet.coinList.length;i++){ |
|
|
|
EthUtil.getTokenBalance(wallet.address,wallet.coinList[i].contractAddress,function(b){ |
|
|
|
wallet.coinList[i].balance=b; |
|
|
@ -228,8 +230,10 @@ let WalletUtil = { |
|
|
|
|
|
|
|
TronUtil.getTronBalance(wallet.address).then((res) => { |
|
|
|
wallet.balance=res; |
|
|
|
wallet.balancePrice=(res*rr).toFixed(2); |
|
|
|
wallet.coinList[0].balance=res |
|
|
|
TronUtil.getContract('TWgEuYRuXgwfDbcfzZsteu5w5dq1nFR35w',wallet.coinList,function(list){ |
|
|
|
wallet.coinList[0].balancePrice=wallet.balancePrice |
|
|
|
TronUtil.getContract(wallet.address,wallet.coinList,function(list){ |
|
|
|
wallet.coinList=list; |
|
|
|
wallet.coinList[1].balancePrice=(wallet.coinList[1].balance*usdt).toFixed(2); |
|
|
|
console.log(wallet.coinList) |
|
|
|