Skip to content

Commit

Permalink
Revert to procedural calls
Browse files Browse the repository at this point in the history
  • Loading branch information
jordankzf committed Jan 25, 2024
1 parent 35d76d0 commit 2a5be33
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/app/hooks/queries/useBtcCoinsBalance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ const useBtcCoinBalance = () => {
// WITH additional supported tokens returned even if not passed
const fetchBrcCoinsBalances = async () => {
try {
// Fetch concurrently to speed things up
const [ordinalsFtBalance, brc20Tokens] = await Promise.all([
getOrdinalsFtBalance(network.type, ordinalsAddress),
getBrc20Tokens(network.type, brcCoinsList?.map((o) => o.ticker!) ?? [], fiatCurrency),
]);
const ordinalsFtBalance = await getOrdinalsFtBalance(network.type, ordinalsAddress);
const brc20Tokens = await getBrc20Tokens(
network.type,
ordinalsFtBalance?.map((o) => o.ticker!) ?? [],
fiatCurrency,
);

const brcCoinsListMap = new Map(brcCoinsList?.map((token) => [token.ticker, token]));

Expand Down

0 comments on commit 2a5be33

Please sign in to comment.