File tree 3 files changed +4
-48
lines changed
3 files changed +4
-48
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
import { ApiPromise } from '@polkadot/api'
2
2
import { AccountId } from '@polkadot/types/interfaces'
3
- import { BN } from '@polkadot/util'
4
- import { formatBalanceToFixed } from './formatBalance'
3
+ import { BN , formatBalance } from '@polkadot/util'
5
4
6
5
/**
7
6
* Returns the native token balance of the given `address`.
@@ -29,11 +28,9 @@ export const getBalance = async (
29
28
const balance = reservedBalance . add ( freeBalance )
30
29
31
30
// Format the balance
32
- const balanceFormatted = formatBalanceToFixed (
33
- balance ,
34
- tokenDecimals ,
35
- fractionDigits ,
36
- )
31
+ const balanceFormatted = formatBalance ( balance , {
32
+ decimals : tokenDecimals ,
33
+ } )
37
34
38
35
return {
39
36
freeBalance,
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ export * from './accountsAreEqual'
3
3
export * from './contractCall'
4
4
export * from './decodeOutput'
5
5
export * from './deployContract'
6
- export * from './formatBalance'
7
6
export * from './getAbiMessage'
8
7
export * from './getBalance'
9
8
export * from './getGasLimit'
You can’t perform that action at this time.
0 commit comments