Skip to content

Commit

Permalink
Peter/fix add wrapped currency as security deposit option (#1360)
Browse files Browse the repository at this point in the history
* chore: update monetary to latest 0.7.3

* fix: add wrapped token to useGetOracleCurrencies result
  • Loading branch information
peterslany authored Jun 27, 2023
1 parent 9f967f5 commit 690d951
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils/hooks/api/oracle/use-get-oracle-currencies.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { CurrencyExt, InterbtcPrimitivesCurrencyId } from '@interlay/interbtc-api';
import { useQuery } from 'react-query';

import { WRAPPED_TOKEN } from '@/config/relay-chains';

import { useGetCurrencies } from '../use-get-currencies';

const getOracleCurrencies = (
Expand All @@ -16,7 +18,8 @@ const getOracleCurrencies = (
getCurrencyFromIdPrimitive(window.bridge.api.createType('InterbtcPrimitivesCurrencyId', ExchangeRate))
);

return currencies;
// Add wrapped token manually as its exchange rate is always available - equal to BTC.
return [WRAPPED_TOKEN, ...currencies];
};

interface UseGetOracleCurrenciesResult {
Expand Down

2 comments on commit 690d951

@vercel
Copy link

@vercel vercel bot commented on 690d951 Jun 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 690d951 Jun 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.