Skip to content

Commit 4df0565

Browse files
committed
feat(graph): remove solana from graph events apart of inserted latest value
1 parent 151cd29 commit 4df0565

File tree

1 file changed

+24
-22
lines changed

1 file changed

+24
-22
lines changed

suite-common/graph/src/graphDataFetching.ts

+24-22
Original file line numberDiff line numberDiff line change
@@ -352,29 +352,31 @@ export const getMultipleAccountBalanceHistoryWithFiat = async ({
352352
dispatch: ReturnType<typeof useDispatch>;
353353
}): Promise<FiatGraphPoint[] | FiatGraphPointWithCryptoBalance[]> => {
354354
const accountsWithBalanceHistory = await Promise.all(
355-
accounts.map(accountItem => {
356-
const { symbol } = accountItem;
357-
358-
return getAccountBalanceHistory({
359-
endOfTimeFrameDate,
360-
startOfTimeFrameDate,
361-
forceRefetch,
362-
dispatch,
363-
accountItem,
364-
})
365-
.then(balanceHistory => ({
355+
accounts
356+
.filter(a => !isIgnoredBalanceHistoryCoin(a.symbol))
357+
.map(accountItem => {
358+
const { symbol } = accountItem;
359+
360+
return getAccountBalanceHistory({
361+
endOfTimeFrameDate,
362+
startOfTimeFrameDate,
363+
forceRefetch,
364+
dispatch,
366365
accountItem,
367-
balanceHistory,
368-
}))
369-
.catch(error => {
370-
console.error(
371-
`Unable to fetch GRAPH balance history for ${symbol} account:`,
372-
error,
373-
);
374-
error.message = `${symbol.toUpperCase()}: ${error.message}`;
375-
throw error;
376-
});
377-
}),
366+
})
367+
.then(balanceHistory => ({
368+
accountItem,
369+
balanceHistory,
370+
}))
371+
.catch(error => {
372+
console.error(
373+
`Unable to fetch GRAPH balance history for ${symbol} account:`,
374+
error,
375+
);
376+
error.message = `${symbol.toUpperCase()}: ${error.message}`;
377+
throw error;
378+
});
379+
}),
378380
);
379381

380382
const accountsWithBalanceHistoryFlattened: AccountWithBalanceHistory[] = pipe(

0 commit comments

Comments
 (0)