TokenRatesController

TokenRatesController

A controller that polls for token exchange rates based on a user's current token list

Constructor

new TokenRatesController(configopt)

Source:

Creates a TokenRatesController

Parameters:
Name Type Attributes Description
config Object <optional>

Options to configure controller

Members

interval :Number

Source:
Type:
  • Number

preferences :Object

Source:
Type:
  • Object

tokens :Array

Source:
Type:
  • Array

Methods

(async) fetchExchangeRate(address)

Source:

Fetches a token exchange rate by address

Parameters:
Name Type Description
address String

Token contract address

(async) updateExchangeRates()

Source:

Updates exchange rates for all tokens