Skip to content

Commit

Permalink
update polkadot/[email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
zx870076178 committed Feb 22, 2019
1 parent 0355da6 commit 029741b
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 70 deletions.
175 changes: 109 additions & 66 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 @@ -13,7 +13,7 @@
"@babel/plugin-proposal-decorators": "^7.2.3",
"@babel/plugin-transform-runtime": "^7.2.0",
"@babel/runtime": "^7.2.0",
"@polkadot/api": "^0.45.8",
"@polkadot/api": "^0.45.12",
"@tradle/react-native-http": "^2.0.1",
"browserify-zlib": "^0.1.4",
"buffer": "^4.9.1",
Expand Down
6 changes: 3 additions & 3 deletions src/code/Staking/Staking.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export default class IntegralMall extends Component {
})
//查询nominating //查询Staking状态
nominating = await api.query.staking.nominating(this.props.rootStore.stateStore.Accounts[this.props.rootStore.stateStore.Account].address)
nominatingBalance = await api.query.balances.freeBalance(nominating)
nominatingBalance = await api.query.balances.freeBalance(String(nominating))
if (String(nominating)!=''&&String(nominating)!='5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUppTZ')
{
this.props.rootStore.stateStore.StakingState=3
Expand All @@ -171,7 +171,7 @@ export default class IntegralMall extends Component {
this.props.rootStore.stateStore.StakingState=1
}
//求出给nominating的提名者们nominatingNominators的额度总和sumnominatingBalance
nominatingNominators = await api.query.staking.nominatorsFor(nominating)
nominatingNominators = await api.query.staking.nominatorsFor(String(nominating))
nominatingBalances = await Promise.all(
nominatingNominators.map(authorityId =>
api.query.balances.freeBalance(authorityId)
Expand Down Expand Up @@ -581,7 +581,7 @@ export default class IntegralMall extends Component {
<Text
style={{marginRight:ScreenWidth/20,fontSize:ScreenWidth/32,color:'#666666'}}
>
{formatBalance(this.state.nominatingBalance)+'('+formatBalance(this.state.sumnominatingBalance)+')'}
{formatBalance(String(this.state.nominatingBalance))+'('+formatBalance(String(this.state.sumnominatingBalance))+')'}
</Text>
</View>
:
Expand Down

0 comments on commit 029741b

Please sign in to comment.