diff --git a/packages/app/src/systems/Account/services/account.ts b/packages/app/src/systems/Account/services/account.ts index f908ae918..36965055b 100644 --- a/packages/app/src/systems/Account/services/account.ts +++ b/packages/app/src/systems/Account/services/account.ts @@ -11,9 +11,9 @@ import { AssetsCache } from '~/systems/Asset/cache/AssetsCache'; import { chromeStorage } from '~/systems/Core/services/chromeStorage'; import type { Maybe } from '~/systems/Core/types'; import { db } from '~/systems/Core/utils/database'; +import { readFromOPFS } from '~/systems/Core/utils/opfs'; import { getUniqueString } from '~/systems/Core/utils/string'; import { getTestNoDexieDbData } from '../utils/getTestNoDexieDbData'; -import { readFromOPFS } from '~/systems/Core/utils/opfs'; export type AccountInputs = { addAccount: { @@ -106,7 +106,7 @@ export class AccountService { try { const provider = await createProvider(providerUrl!); - const balances = await getBalances(provider, account.publicKey); + const balances = await getBalances(provider, account.address); const balanceAssets = await AssetsCache.fetchAllAssets( provider.getChainId(), balances.map((balance) => balance.assetId) @@ -467,8 +467,7 @@ export class AccountService { // Private methods // ---------------------------------------------------------------------------- -async function getBalances(provider: Provider, publicKey = '0x00') { - const address = Address.fromPublicKey(publicKey); +async function getBalances(provider: Provider, address: string) { const { balances } = await provider.getBalances(address); return balances; }