Skip to content

Commit

Permalink
Feature/fix oracle config (#154)
Browse files Browse the repository at this point in the history
## Description

Add BTCUSDT oracle pair config that was breaking the client. It is also including the EUR config from this PR #153

## Other changes

- updated Novadax exchange adapter certificate

## Tested

ran the config and novadax API call locally

## Related issues

- Fixes https://github.com/mento-protocol/mento-general/issues/169

## Backwards compatibility

yup
  • Loading branch information
tobikuhlmann authored Feb 21, 2023
1 parent a48ad28 commit 16c42a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/exchange_adapters/novadax.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class NovaDaxAdapter extends BaseExchangeAdapter implements ExchangeAdapt
readonly _exchangeName = Exchange.NOVADAX
// NovaDAX's certificate fingerprint.
readonly _certFingerprint256 =
'4F:04:74:C6:3E:28:50:64:B1:38:00:09:8A:79:6F:FF:BF:C0:E8:AB:98:AD:AE:99:88:FD:66:3A:5A:48:00:24'
'A2:05:26:4C:3F:90:D3:DB:37:4A:CE:4E:AF:33:8B:51:89:75:39:2D:7A:98:2F:EE:76:B8:2F:4A:02:23:89:7B'

private static readonly tokenSymbolMap = NovaDaxAdapter.standardTokenSymbolMap

Expand Down
6 changes: 6 additions & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export enum OracleCurrencyPair {
CELOBUSD = 'CELOBUSD',
EURUSDT = 'EURUSDT',
BTCUSD = 'BTCUSD',
BTCUSDT = 'BTCUSDT',
BTCBRL = 'BTCBRL',
USDTUSD = 'USDTUSD',
USDTUSDC = 'USDTUSDC',
Expand All @@ -70,7 +71,9 @@ export enum OracleCurrencyPair {
BUSDUSD = 'BUSDUSD',
USDBRL = 'USDBRL',
USDCUSD = 'USDCUSD',
USDCEUR = 'USDCEUR',
USDCUSDT = 'USDCUSDT',
EURUSD = 'EURUSD',
}

export const CoreCurrencyPair: OracleCurrencyPair[] = [
Expand Down Expand Up @@ -101,7 +104,10 @@ export const CurrencyPairBaseQuote: Record<
[OracleCurrencyPair.BUSDUSD]: { base: ExternalCurrency.BUSD, quote: ExternalCurrency.USD },
[OracleCurrencyPair.USDBRL]: { base: ExternalCurrency.USD, quote: ExternalCurrency.BRL },
[OracleCurrencyPair.USDCUSD]: { base: ExternalCurrency.USDC, quote: ExternalCurrency.USD },
[OracleCurrencyPair.USDCEUR]: { base: ExternalCurrency.USDC, quote: ExternalCurrency.EUR },
[OracleCurrencyPair.USDCUSDT]: { base: ExternalCurrency.USDC, quote: ExternalCurrency.USDT },
[OracleCurrencyPair.EURUSD]: { base: ExternalCurrency.EUR, quote: ExternalCurrency.USD },
[OracleCurrencyPair.BTCUSDT]: { base: ExternalCurrency.BTC, quote: ExternalCurrency.USDT },
}

export enum AggregationMethod {
Expand Down

0 comments on commit 16c42a8

Please sign in to comment.