Skip to content

Commit

Permalink
fix free balance (#474)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariopino authored Mar 18, 2020
1 parent 3c9745f commit 2dede39
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/source/polkadotV0-source.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ class polkadotAPI {
async getBalancesFromAddress(address) {
const api = await this.getAPI()
const account = await api.query.system.account(address)
const freeBalance = account.data.free
const totalBalance = BigNumber(account.data.free.toString()).plus(
account.data.reserved.toString()
const totalBalance = account.data.free
const freeBalance = BigNumber(totalBalance.toString()).minus(
account.data.miscFrozen.toString()
)
return this.reducers.balanceReducer(
this.network,
Expand Down

0 comments on commit 2dede39

Please sign in to comment.