diff --git a/api/account-balance.ts b/api/account-balance.ts index a1738f5cb..0ed3eade8 100644 --- a/api/account-balance.ts +++ b/api/account-balance.ts @@ -2,7 +2,7 @@ import { VercelResponse } from "@vercel/node"; import { assert, Infer, type, string } from "superstruct"; import { TypedVercelRequest } from "./_types"; import { - getCachedLatestBalance, + latestBalanceCache, getLogger, handleErrorCondition, validAddress, @@ -31,11 +31,11 @@ const handler = async ( let { token, account, chainId } = query; - const balance = await getCachedLatestBalance( + const balance = await latestBalanceCache( Number(chainId), token, account - ); + ).get(); const result = { balance: balance.toString(), account: account,