@toruslabs/casper-controllers
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -618,2 +618,4 @@ /******/ (() => { // webpackBootstrap | ||
function CurrencyController_createSuper(Derived) { var hasNativeReflectConstruct = CurrencyController_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; } | ||
@@ -631,2 +633,4 @@ | ||
function CurrencyController(_ref) { | ||
var _this; | ||
var config = _ref.config, | ||
@@ -638,6 +642,10 @@ _ref$state = _ref.state, | ||
return _super.call(this, { | ||
_this = _super.call(this, { | ||
config: config, | ||
state: state | ||
}); | ||
defineProperty_default()(assertThisInitialized_default()(_this), "conversionInterval", void 0); | ||
return _this; | ||
} | ||
@@ -738,2 +746,15 @@ /** | ||
}() | ||
}, { | ||
key: "scheduleConversionInterval", | ||
value: function scheduleConversionInterval() { | ||
var _this2 = this; | ||
if (this.conversionInterval) { | ||
window.clearInterval(this.conversionInterval); | ||
} | ||
this.conversionInterval = window.setInterval(function () { | ||
_this2.updateConversionRate(); | ||
}, this.config.pollInterval); | ||
} | ||
}]); | ||
@@ -740,0 +761,0 @@ |
@@ -618,2 +618,4 @@ /******/ (() => { // webpackBootstrap | ||
function CurrencyController_createSuper(Derived) { var hasNativeReflectConstruct = CurrencyController_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; } | ||
@@ -631,2 +633,4 @@ | ||
function CurrencyController(_ref) { | ||
var _this; | ||
var config = _ref.config, | ||
@@ -638,6 +642,10 @@ _ref$state = _ref.state, | ||
return _super.call(this, { | ||
_this = _super.call(this, { | ||
config: config, | ||
state: state | ||
}); | ||
defineProperty_default()(assertThisInitialized_default()(_this), "conversionInterval", void 0); | ||
return _this; | ||
} | ||
@@ -738,2 +746,15 @@ /** | ||
}() | ||
}, { | ||
key: "scheduleConversionInterval", | ||
value: function scheduleConversionInterval() { | ||
var _this2 = this; | ||
if (this.conversionInterval) { | ||
window.clearInterval(this.conversionInterval); | ||
} | ||
this.conversionInterval = window.setInterval(function () { | ||
_this2.updateConversionRate(); | ||
}, this.config.pollInterval); | ||
} | ||
}]); | ||
@@ -740,0 +761,0 @@ |
{ | ||
"name": "@toruslabs/casper-controllers", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"homepage": "https://github.com/torusresearch/controllers#readme", | ||
@@ -22,4 +22,4 @@ "license": "ISC", | ||
"dependencies": { | ||
"@toruslabs/base-controllers": "^0.0.3", | ||
"@toruslabs/openlogin-jrpc": "^0.10.1", | ||
"@toruslabs/base-controllers": "^0.0.4", | ||
"@toruslabs/openlogin-jrpc": "^0.10.2", | ||
"async-mutex": "^0.3.2", | ||
@@ -59,3 +59,3 @@ "casper-js-sdk": "^2.5.0", | ||
}, | ||
"gitHead": "d0d672a54a49ee47d1e3b424d8edf9c4c892d347" | ||
"gitHead": "7317261b5216de8dff02ae17db1d77686c6c2829" | ||
} |
import { BaseCurrencyController, BaseCurrencyControllerConfig, BaseCurrencyControllerState } from "@toruslabs/base-controllers"; | ||
export declare class CurrencyController extends BaseCurrencyController<BaseCurrencyControllerConfig, BaseCurrencyControllerState> { | ||
private conversionInterval; | ||
constructor({ config, state }: { | ||
@@ -13,2 +14,3 @@ config: Partial<BaseCurrencyControllerConfig>; | ||
updateConversionRate(): Promise<void>; | ||
scheduleConversionInterval(): void; | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2666836
3094
+ Added@toruslabs/base-controllers@0.0.4(transitive)
- Removed@toruslabs/base-controllers@0.0.3(transitive)