Skip to content

Commit

Permalink
Merge pull request #617 from interlay/peter/fix-calculateAPY-isZero-c…
Browse files Browse the repository at this point in the history
…heck

hotfix: update calculateAPY comparison
  • Loading branch information
daniel-savu authored Mar 21, 2023
2 parents b762286 + cfd1ea2 commit efe21a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@interlay/interbtc-api",
"version": "2.0.1",
"version": "2.0.2",
"description": "JavaScript library to interact with interBTC",
"main": "build/src/index.js",
"typings": "build/src/index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion src/parachain/fee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ export class DefaultFeeAPI implements FeeAPI {
lockedCollateral: MonetaryAmount<CollateralCurrencyExt>,
exchangeRate?: ExchangeRate<Bitcoin, CollateralCurrencyExt>
): Promise<Big> {
if (lockedCollateral.isZero()) {
// TODO: change back to isZero once monetary fix is released.
if (lockedCollateral.toBig().eq(0)) {
return new Big(0);
}
if (exchangeRate === undefined) {
Expand Down

0 comments on commit efe21a9

Please sign in to comment.