Skip to content

Commit

Permalink
Merge branch 'master' into release/interlay/2.41.14
Browse files Browse the repository at this point in the history
* master: (246 commits)
  chore: release v2.41.14
  chore: update XCM nodes (#1672)
  Cherry pick: api: add phala-network to the pricefeed (#1668) (#1670)
  chore: Update xcm-endpoints.ts (#1669)
  exclude USDC.wh from foreign assets (#1643)
  chore: release v2.41.13
  chore: bump bridge and add new dependency (#1664)
  Fixed a small dashboard display issue (#1658)
  chore: release v2.41.12
  api: improve cache-control headers (#1659)
  chore: release v2.41.11
  chore: release v2.41.10
  HDX and BNC icons (#1655)
  api: add Vercel KV cache for storing market data (#1654)
  Tom/bridge 0.5.1 (#1651)
  chore: release v2.41.9
  chore: bump bridge (#1648)
  chore: release v2.41.8
  hotfix: XCM polkadot/kintsugi max transferable balance (#1645)
  Revert "[release] Interlay 2.41.7 (#1639)" (#1641)
  ...

# Conflicts:
#	package.json
#	src/hooks/api/use-get-currencies.tsx
#	src/hooks/api/xcm/xcm-endpoints.ts
#	yarn.lock
  • Loading branch information
tomjeatt committed Oct 9, 2024
2 parents b8ffbe2 + cb767c1 commit 9085b56
Show file tree
Hide file tree
Showing 4 changed files with 583 additions and 116 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "interbtc-ui",
"version": "2.41.13",
"version": "2.41.14",
"private": true,
"dependencies": {
"@acala-network/sdk-core": "^4.1.5",
"@craco/craco": "^6.1.1",
"@headlessui/react": "^1.1.1",
"@heroicons/react": "^2.0.18",
"@interlay/bridge": "^0.6.0",
"@interlay/bridge": "^0.6.2",
"@interlay/interbtc-api": "2.6.0",
"@interlay/monetary-js": "0.7.3",
"@polkadot/api": "10.9.1",
Expand Down
11 changes: 10 additions & 1 deletion src/hooks/api/use-get-currencies.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import { useQuery, UseQueryResult } from 'react-query';
import { CurrencySquidFormat } from '@/types/currency';
import { NATIVE_CURRENCIES } from '@/utils/constants/currency';

enum ExcludedForeignCurrencies {
USDC_WH = 'USDC.wh'
}

type UseGetCurrenciesResult = UseQueryResult<Array<CurrencyExt>> & {
getCurrencyFromTicker: (ticker: string) => CurrencyExt;
getForeignCurrencyFromId: (id: number) => CurrencyExt;
Expand All @@ -18,7 +22,12 @@ const getCurrencies = async (): Promise<Array<CurrencyExt>> => {
window.bridge.loans.getLendTokens(),
window.bridge.amm.getLpTokens()
]);
return [...NATIVE_CURRENCIES, ...foreignCurrencies, ...lendCurrencies, ...lpTokens];

const filteredForeignCurrencies = foreignCurrencies.filter(
(currency) => !Object.values(ExcludedForeignCurrencies).includes(currency.ticker as ExcludedForeignCurrencies)
);

return [...NATIVE_CURRENCIES, ...filteredForeignCurrencies, ...lendCurrencies, ...lpTokens];
};

// Returns all currencies, both native and foreign and helping utils to get CurrencyExt object.
Expand Down
17 changes: 11 additions & 6 deletions src/hooks/api/xcm/xcm-endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ const XCMEndpoints: XCMEndpointsRecord = {
acala: ['wss://acala-rpc-1.aca-api.network', 'wss://acala-rpc-3.aca-api.network/ws', 'wss://acala-rpc.dwellir.com'],
astar: ['wss://rpc.astar.network', 'wss://astar-rpc.dwellir.com'],
bifrost: ['wss://bifrost-rpc.dwellir.com', 'wss://us.bifrost-rpc.liebi.com/ws', 'wss://bifrost-rpc.liebi.com/ws'],
bifrost_polkadot: ['wss://hk.p.bifrost-rpc.liebi.com/ws'],
bifrost_polkadot: [
'wss://hk.p.bifrost-rpc.liebi.com/ws',
'wss://bifrost-polkadot-rpc.dwellir.com',
'wss://eu.bifrost-polkadot-rpc.liebi.com/ws'
],
heiko: ['wss://heiko-rpc.parallel.fi'],
hydra: ['wss://rpc.hydradx.cloud', 'wss://hydradx-rpc.dwellir.com'],
interlay: ['wss://api.interlay.io/parachain'],
Expand All @@ -17,17 +21,18 @@ const XCMEndpoints: XCMEndpointsRecord = {
'wss://karura-rpc-3.aca-api.network/ws'
],
kintsugi: ['wss://api-kusama.interlay.io/parachain'],
kusama: ['wss://kusama-rpc.polkadot.io', 'wss://kusama-rpc.dwellir.com'],
parallel: ['wss://parallel-rpc.dwellir.com', 'wss://polkadot-rpc.parallel.fi'],
polkadot: ['wss://rpc.polkadot.io', 'wss://polkadot-rpc.dwellir.com'],
kusama: ['wss://kusama-rpc.dwellir.com', 'wss://rpc.ibp.network/kusama', 'wss://rpc-kusama.luckyfriday.io'],
parallel: ['wss://polkadot-parallel-rpc.parallel.fi', 'wss://parallel-rpc.dwellir.com'],
phala: ['wss://api.phala.network/ws', 'wss://phala-rpc.dwellir.com'],
polkadot: ['wss://polkadot-rpc.dwellir.com', 'wss://rpc.ibp.network/polkadot', 'wss://rpc-polkadot.luckyfriday.io'],
statemine: [
'wss://kusama-asset-hub-rpc.polkadot.io',
'wss://statemine-rpc.dwellir.com',
'wss://asset-hub-kusama-rpc.dwellir.com',
'wss://statemine-rpc-tn.dwellir.com'
],
statemint: [
'wss://polkadot-asset-hub-rpc.polkadot.io',
'wss://statemint-rpc.dwellir.com',
'wss://asset-hub-polkadot-rpc.dwellir.com',
'wss://statemint-rpc-tn.dwellir.com'
]
};
Expand Down
Loading

0 comments on commit 9085b56

Please sign in to comment.