Skip to content

Commit

Permalink
fix name for balance of util function
Browse files Browse the repository at this point in the history
  • Loading branch information
janndriessen committed Oct 27, 2024
1 parent 4e58126 commit 1308a9d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/quote/provider/icusd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
WrappedTransactionBuilder,
} from 'flashmint'
import { getExpectedReserveRedeemQuantity } from 'utils/custom-oracle-nav-issuance-module'
import { getUsdcBalance } from 'utils/erc20'
import { getBalanceOf } from 'utils/erc20'

import { FlashMintNavQuoteProvider } from '../flashmint/nav'
import { WrappedQuoteProvider } from '../flashmint/wrapped'
Expand Down Expand Up @@ -55,7 +55,7 @@ export class IcUsdQuoteRouter
if (request.isMinting) {
return await this.getFlashMintNavQuote(request)
} else {
const usdcBalance = await getUsdcBalance(
const usdcBalance = await getBalanceOf(
usdc.address,
icUsd.address as Address,
chainId
Expand Down
6 changes: 3 additions & 3 deletions src/tests/icusd.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BigNumber } from '@ethersproject/bignumber'
import { Address, formatUnits } from 'viem'

import { getUsdcBalance } from 'utils/erc20'
import { getBalanceOf } from 'utils/erc20'
import {
getMainnetTestFactory,
QuoteTokens,
Expand All @@ -22,7 +22,7 @@ describe('icUSD (mainnet)', () => {
})

test('can mint with USDC', async () => {
const usdcBalance = await getUsdcBalance(
const usdcBalance = await getBalanceOf(
usdc.address as Address,
indexToken.address as Address,
1
Expand Down Expand Up @@ -63,7 +63,7 @@ describe('icUSD (mainnet)', () => {
})

test('can redeem to USDC (via FMWrapped)', async () => {
const usdcBalance = await getUsdcBalance(
const usdcBalance = await getBalanceOf(
usdc.address as Address,
indexToken.address as Address,
1
Expand Down
2 changes: 1 addition & 1 deletion src/utils/erc20.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Address, parseAbi } from 'viem'
import { createClient } from './clients'

export async function getUsdcBalance(
export async function getBalanceOf(
token: Address,
account: Address,
chainId: number
Expand Down

0 comments on commit 1308a9d

Please sign in to comment.