Skip to content

Commit 44dc374

Browse files
authored
chore(currency): export AggregatorsMap (#925)
1 parent af836c2 commit 44dc374

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

packages/currency/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
export { getSupportedERC20Tokens } from './erc20';
22
export { getSupportedERC777Tokens } from './erc777';
3-
export { conversionSupportedNetworks, CurrencyPairs } from './conversion-aggregators';
3+
export {
4+
conversionSupportedNetworks,
5+
CurrencyPairs,
6+
AggregatorsMap,
7+
} from './conversion-aggregators';
48
export { getHash as getCurrencyHash } from './getHash';
59
export { CurrencyManager } from './currencyManager';
610
export * from './types';

packages/currency/test/chainlink-path-aggregators.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable @typescript-eslint/no-non-null-assertion */
2-
import { CurrencyPairs, getPath } from '../src/conversion-aggregators';
2+
import { AggregatorsMap, getPath } from '../src/conversion-aggregators';
33
import { CurrencyManager } from '../src';
44
const currencyManager = CurrencyManager.getDefault();
55
const USD = currencyManager.from('USD')!;
@@ -8,7 +8,7 @@ const EUR = currencyManager.from('EUR')!;
88
const fakeDAI = { hash: '0x38cf23c52bb4b13f051aec09580a2de845a7fa35' };
99

1010
describe('getPath', () => {
11-
const mockAggregatorPaths: Record<string, CurrencyPairs> = {
11+
const mockAggregatorPaths: AggregatorsMap = {
1212
private: {
1313
[fakeDAI.hash]: {
1414
[USD.hash]: 1,

packages/toolbox/src/commands/chainlink/aggregatorsUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CurrencyManager, CurrencyInput, CurrencyPairs } from '@requestnetwork/currency';
1+
import { CurrencyManager, CurrencyInput, AggregatorsMap } from '@requestnetwork/currency';
22
import axios from 'axios';
33
import { RequestLogicTypes } from '@requestnetwork/types';
44

@@ -93,7 +93,7 @@ const loadCurrencyApi = async <T>(path: string): Promise<T> => {
9393
};
9494

9595
export const getCurrencyManager = async (list?: string): Promise<CurrencyManager> => {
96-
const aggregators = await loadCurrencyApi<Record<string, CurrencyPairs>>('/aggregators');
96+
const aggregators = await loadCurrencyApi<AggregatorsMap>('/aggregators');
9797
const currencyList = list
9898
? await loadCurrencyApi<CurrencyInput[]>(`/list/${list}`)
9999
: CurrencyManager.getDefaultList();

0 commit comments

Comments
 (0)