Skip to main content

CurrencyRateController Actions

5 actions registered.

NameDeprecated
getState
setCurrentCurrency
startPolling
stopPollingByPollingToken
updateExchangeRate

CurrencyRateController:getState​

Package: @metamask/assets-controllers

Handler signature:

() => CurrencyRateState

CurrencyRateController:setCurrentCurrency​

Package: @metamask/assets-controllers

Sets a currency to track.

Parameters:

NameDescription
currentCurrencyISO 4217 currency code.

Handler signature:

(currentCurrency: string) => Promise<void>

CurrencyRateController:startPolling​

Package: @metamask/assets-controllers

Handler signature:

CurrencyRateController['startPolling']

CurrencyRateController:stopPollingByPollingToken​

Package: @metamask/assets-controllers

Handler signature:

CurrencyRateController['stopPollingByPollingToken']

CurrencyRateController:updateExchangeRate​

Package: @metamask/assets-controllers

Updates the exchange rate for the current currency and native currency pairs.

Parameters:

NameDescription
nativeCurrenciesThe native currency symbols to fetch exchange rates for.

Handler signature:

(nativeCurrencies: (string | undefined)[]) => Promise<void>