Skip to content

Commit

Permalink
🐛 Fix Asset Amount Fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
nawar-hisso committed Dec 10, 2024
1 parent b2db859 commit fd17805
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,14 @@ export const useFetchContractData = ({
setCurrentPeriod(_currentPeriod);

const assetAmountData = await refetchAssetAmount();
const assetAmountBigInt = BigInt(typeof assetAmountData?.data === "number" || typeof assetAmountData?.data === "string" ? assetAmountData.data : 0);
const assetAmountBigInt = BigInt(
typeof assetAmountData?.data === "number" ||
typeof assetAmountData?.data === "string" ||
typeof assetAmountData?.data === "bigint"
? assetAmountData.data
: 0,
);

setAssetAmount(ethers.formatUnits(assetAmountBigInt, 6));

const startTimeData = await refetchStartTime();
Expand Down

0 comments on commit fd17805

Please sign in to comment.