diff options
NO MIXED TABS AND SPACES
Diffstat (limited to 'app/scripts/controllers/currency.js')
-rw-r--r-- | app/scripts/controllers/currency.js | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/app/scripts/controllers/currency.js b/app/scripts/controllers/currency.js index c23c7f616..37a19ff0d 100644 --- a/app/scripts/controllers/currency.js +++ b/app/scripts/controllers/currency.js @@ -6,12 +6,12 @@ const POLLING_INTERVAL = 600000 class CurrencyController { - /** - * Controller responsible for managing data associated with the currently selected currency. - * + /** + * Controller responsible for managing data associated with the currently selected currency. + * * @typedef {Object} CurrencyController - * @param {object} opts Overrides the defaults for the initial state of this.store - * @property {array} opts.initState initializes the the state of the CurrencyController. Can contain an + * @param {object} opts Overrides the defaults for the initial state of this.store + * @property {array} opts.initState initializes the the state of the CurrencyController. Can contain an * currentCurrency, conversionRate and conversionDate properties * @property {string} currentCurrency A 2-4 character shorthand that describes a specific currency, currently * selected by the user @@ -20,8 +20,8 @@ class CurrencyController { * since midnight of January 1, 1970 * @property {number} conversionInterval The id of the interval created by the scheduleConversionInterval method. * Used to clear an existing interval on subsequent calls of that method. - * - */ + * + */ constructor (opts = {}) { const initState = extend({ currentCurrency: 'usd', @@ -35,22 +35,22 @@ class CurrencyController { // PUBLIC METHODS // - /** - * A getter for the currentCurrency property - * - * @returns {string} A 2-4 character shorthand that describes a specific currency, currently selected by the user - * - */ + /** + * A getter for the currentCurrency property + * + * @returns {string} A 2-4 character shorthand that describes a specific currency, currently selected by the user + * + */ getCurrentCurrency () { return this.store.getState().currentCurrency } - /** - * A setter for the currentCurrency property - * - * @param {string} currentCurrency The new currency to set as the currentCurrency in the store - * - */ + /** + * A setter for the currentCurrency property + * + * @param {string} currentCurrency The new currency to set as the currentCurrency in the store + * + */ setCurrentCurrency (currentCurrency) { this.store.updateState({ currentCurrency }) } @@ -117,12 +117,12 @@ class CurrencyController { } } - /** - * Creates a new poll, using setInterval, to periodically call updateConversionRate. The id of the interval is + /** + * Creates a new poll, using setInterval, to periodically call updateConversionRate. The id of the interval is * stored at the controller's conversionInterval property. If it is called and such an id already exists, the * previous interval is clear and a new one is created. - * - */ + * + */ scheduleConversionInterval () { if (this.conversionInterval) { clearInterval(this.conversionInterval) |