Skip to content

Commit

Permalink
fix: Replace last getAuroraProvider with getAuroraCloudProvider.
Browse files Browse the repository at this point in the history
  • Loading branch information
paouvrard committed Feb 26, 2024
1 parent 909f58c commit a02d43c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/aurora-nep141/src/bridged-erc20/getBalance.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ethers } from 'ethers'
import { getAuroraProvider, getBridgeParams } from '@near-eth/client/dist/utils'
import { getAuroraCloudProvider, getBridgeParams } from '@near-eth/client/dist/utils'
import { erc20 } from '@near-eth/utils'

export default async function getBalance (
Expand All @@ -9,12 +9,13 @@ export default async function getBalance (
options?: {
provider?: ethers.providers.Provider
auroraErc20Abi?: string
auroraEvmAccount?: string
}
}
): Promise<string> {
options = options ?? {}
const bridgeParams = getBridgeParams()
const provider = options.provider ?? getAuroraProvider()
const provider = options.provider ?? getAuroraCloudProvider({ auroraEvmAccount: options.auroraEvmAccount })
const erc20Abi = options.auroraErc20Abi ?? bridgeParams.auroraErc20Abi

const balance = await erc20.getBalance({ erc20Address, owner, provider, erc20Abi })
Expand Down

0 comments on commit a02d43c

Please sign in to comment.