Skip to content

Commit

Permalink
fix: ts error in useMultipleSupply
Browse files Browse the repository at this point in the history
  • Loading branch information
akanoce committed Jan 21, 2024
1 parent 693a0bb commit af87b8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/web/src/hooks/useMultipleSupplyWithBorrow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import BigNumber from 'bignumber.js';

type TAmountAndReserve = {
amountInUsd: number | string;
reserve: ReserveDataHumanized & FormatReserveUSDResponse;
reserve?: ReserveDataHumanized & FormatReserveUSDResponse;
amount: string;
};

Expand All @@ -35,6 +35,7 @@ export const useMultipleSupplyWithBorrow = ({ toSupply, toBorrow }: Props) => {
const allTxs: EthereumTransactionTypeExtended[] = [];
let totalEstimatedAvailableUsdToBorrow: number = 0;
for (const { amount, reserve, amountInUsd } of toSupply) {
if (!reserve) throw new Error('no reserve');
const supplyData: LPSupplyParamsType = {
amount: amount,
user: account,
Expand Down

0 comments on commit af87b8a

Please sign in to comment.