Skip to content

Commit

Permalink
cleanup debug
Browse files Browse the repository at this point in the history
  • Loading branch information
brightiron committed Nov 22, 2023
1 parent ca88dad commit 26d51a1
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
3 changes: 0 additions & 3 deletions src/views/Lending/Cooler/hooks/useGetCoolerBalance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ export const useGetCoolerBalance = ({ coolerAddress }: { coolerAddress?: string
try {
if (!coolerAddress) return new DecimalBigNumber("0", 18);
const contract = IERC20__factory.connect(GOHM_ADDRESSES[networks.MAINNET], provider);
console.log("beforeBalanceOf");
const balance = await contract.balanceOf(coolerAddress);
console.log("balance", balance.toString());

return new DecimalBigNumber(balance, 18);
} catch {
return new DecimalBigNumber("0", 18);
Expand Down
2 changes: 1 addition & 1 deletion src/views/MyBalances/MyCoolerLoans.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const MyCoolerLoans = ({ balance, balanceUSD }: { balance: string; balanc
const daysLeft = Math.floor((expiryDate.getTime() - currentDate.getTime()) / (1000 * 3600 * 24));
const percentComplete = ((requestDays - daysLeft) / requestDays) * 100;
return (
<Box display="flex" justifyContent="space-between" mt="18px">
<Box display="flex" justifyContent="space-between" mt="18px" key={loan.loanId}>
<Box width="50%">
<Box display="flex" gap="3px">
<Token name="gOHM" style={{ fontSize: "21px" }} />
Expand Down
2 changes: 0 additions & 2 deletions src/views/MyBalances/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ export const MyBalances: FC<OHMAssetsProps> = () => {
.filter(nonNullable)
.reduce((res, bal) => res.add(bal), new DecimalBigNumber("0", 18));

const formattedohmBalance = totalOhmBalance.toString({ decimals: 4, trim: false, format: true });
const formattedgOhmBalance = totalGohmBalance.toString({ decimals: 4, trim: false, format: true });
const gOhmPrice = ohmPrice * currentIndex.toApproxNumber();
const coolerBalance = totalCoolerBalance.toString({ decimals: 4, trim: false, format: true });
Expand Down Expand Up @@ -142,7 +141,6 @@ export const MyBalances: FC<OHMAssetsProps> = () => {
},
];

console.log(tokenArray, "tokenArray");
const walletTotalValueUSD = Object.values(tokenArray).reduce((totalValue, token) => totalValue + token.assetValue, 0);
const myOhmBalancesTotalValueUSD = Object.values(myOhmBalances).reduce(
(totalValue, token) => totalValue + token.assetValue,
Expand Down

0 comments on commit 26d51a1

Please sign in to comment.