Skip to content

Commit

Permalink
fix(FIL): return balance correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
0x31 committed Nov 10, 2020
1 parent decd7fe commit 67c554d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/handlers/FIL/FILHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,18 @@ export class FILHandler
asset: Asset,
options: BalanceOptions = {}
): Promise<BigNumber> =>
(await this.getBalanceInSats(asset, options)).dividedBy(
new BigNumber(10).exponentiatedBy(this.decimals)
new BigNumber(
await this.sharedState.filecoin.getBalance(
(options && options.address) || (await this.address(asset))
)
);

public readonly getBalanceInSats = async (
asset: Asset,
options: BalanceOptions = {}
): Promise<BigNumber> =>
new BigNumber(
await this.sharedState.filecoin.getBalance(
(options && options.address) || (await this.address(asset))
)
(await this.getBalance(asset, options)).multipliedBy(
new BigNumber(10).exponentiatedBy(this.decimals)
);

// Transfer
Expand Down

0 comments on commit 67c554d

Please sign in to comment.