Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
fix(notional-finance-v3): Fix borrow balances (#3142)
Browse files Browse the repository at this point in the history
  • Loading branch information
wpoulin committed Dec 13, 2023
1 parent 93ad3a5 commit fb6b24a
Showing 1 changed file with 3 additions and 4 deletions.
Expand Up @@ -112,9 +112,7 @@ export class ArbitrumNotionalFinanceV3BorrowContractPositionFetcher extends Cont
}

async getTokenDefinitions({ definition }: GetTokenDefinitionsParams<NotionalView, NotionalBorrowingDefinition>) {
return [
{ metaType: MetaType.BORROWED, address: definition.address, network: this.network, tokenId: definition.tokenId },
];
return [{ metaType: MetaType.BORROWED, address: definition.underlyingTokenAddress, network: this.network }];
}

async getDataProps(
Expand Down Expand Up @@ -145,7 +143,8 @@ export class ArbitrumNotionalFinanceV3BorrowContractPositionFetcher extends Cont
.times(10 ** contractPosition.tokens[0].decimals)
.div(10 ** 8);

const presentValue = fcashAmountAtMaturity.times(new BigNumber(fCashPV));
const presentValueRaw = fcashAmountAtMaturity.times(new BigNumber(fCashPV));
const presentValue = presentValueRaw.absoluteValue();

return [presentValue.toString()];
}
Expand Down

0 comments on commit fb6b24a

Please sign in to comment.