Skip to content

Commit f7396b3

Browse files
feat: add Solana to the polled exchange rates
1 parent 63babc4 commit f7396b3

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

packages/assets-controllers/src/RatesController/RatesController.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,15 @@ import type {
1212

1313
export const name = 'RatesController';
1414

15+
/**
16+
* Supported cryptocurrencies that can be used as a base currency. The value needs to be compatible
17+
* with CryptoCompare's API which is the default source for the rates.
18+
*
19+
* See: https://min-api.cryptocompare.com/documentation?key=Price&cat=multipleSymbolsPriceEndpoint
20+
*/
1521
export enum Cryptocurrency {
1622
Btc = 'btc',
23+
Solana = 'sol',
1724
}
1825

1926
const DEFAULT_INTERVAL = 180000;
@@ -31,8 +38,12 @@ const defaultState = {
3138
conversionDate: 0,
3239
conversionRate: 0,
3340
},
41+
[Cryptocurrency.Solana]: {
42+
conversionDate: 0,
43+
conversionRate: 0,
44+
},
3445
},
35-
cryptocurrencies: [Cryptocurrency.Btc],
46+
cryptocurrencies: [Cryptocurrency.Btc, Cryptocurrency.Solana],
3647
};
3748

3849
export class RatesController extends BaseController<

0 commit comments

Comments
 (0)