Skip to content

Commit

Permalink
feat(frontend): add BTC price to exchange store (#2087)
Browse files Browse the repository at this point in the history
# Motivation

Since it is already being fetched, the Bitcoin Mainnet price will be
added to the `exchanges` store.
  • Loading branch information
AntonioVentilii-DFINITY authored Aug 21, 2024
1 parent ad0d22d commit c19331c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/frontend/src/lib/derived/exchange.derived.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { BTC_MAINNET_TOKEN_ID } from '$env/tokens.btc.env';
import { ETHEREUM_TOKEN_ID, ICP_TOKEN_ID, SEPOLIA_TOKEN_ID } from '$env/tokens.env';
import { enabledErc20Tokens } from '$eth/derived/erc20.derived';
import type { Erc20Token } from '$eth/types/erc20';
Expand All @@ -20,6 +21,7 @@ export const exchanges: Readable<ExchangesData> = derived(
const icpPrice = $exchangeStore?.['internet-computer'];

return {
[BTC_MAINNET_TOKEN_ID]: btcPrice,
[ETHEREUM_TOKEN_ID]: ethPrice,
[SEPOLIA_TOKEN_ID]: ethPrice,
[ICP_TOKEN_ID]: icpPrice,
Expand Down

0 comments on commit c19331c

Please sign in to comment.