mirror of
https://github.com/hanzo-labs/arcadia.git
synced 2026-10-30 18:55:41 +00:00
33 lines
1.2 KiB
JavaScript
33 lines
1.2 KiB
JavaScript
'use strict';
|
|
var footerCtrl = function($scope, globalService) {
|
|
var gasPriceKey = "gasPrice";
|
|
$scope.footerModal = new Modal(document.getElementById('disclaimerModal'));
|
|
$scope.ethBlockNumber = "loading";
|
|
$scope.etcBlockNumber = "loading";
|
|
$scope.showBlocks = window.location.protocol == "https:";
|
|
$scope.setBlockNumbers = function() {
|
|
if (!$scope.showBlocks) return;
|
|
ajaxReq.getCurrentBlock(function(data) { $scope.currentBlockNumber = data.data; });
|
|
}
|
|
$scope.setBlockNumbers();
|
|
$scope.globalService = globalService;
|
|
|
|
$scope.curLang = globalFuncs.curLang;
|
|
$scope.gasChanged = function() {
|
|
globalFuncs.localStorage.setItem(gasPriceKey, $scope.gas.value);
|
|
ethFuncs.gasAdjustment = $scope.gas.value;
|
|
}
|
|
var setGasValues = function() {
|
|
$scope.gas = {
|
|
curVal: 21,
|
|
value: globalFuncs.localStorage.getItem(gasPriceKey, null) ? parseInt(globalFuncs.localStorage.getItem(gasPriceKey)) : 21,
|
|
max: 60,
|
|
min: 1
|
|
}
|
|
ethFuncs.gasAdjustment = $scope.gas.value;
|
|
}
|
|
setGasValues();
|
|
$scope.gasChanged();
|
|
};
|
|
module.exports = footerCtrl;
|