Skip to content
This repository has been archived by the owner on Nov 21, 2019. It is now read-only.

Commit

Permalink
accept gaslimit or gas
Browse files Browse the repository at this point in the history
  • Loading branch information
tayvano committed Nov 21, 2016
1 parent 39c8433 commit 81c7bb1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
7 changes: 4 additions & 3 deletions app/scripts/controllers/sendTxCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ var sendTxCtrl = function($scope, $sce, walletService) {
$scope.dropdownAmount = false;
}
$scope.tx = {
gasLimit: globalFuncs.urlGet('gaslimit') == null ? globalFuncs.defaultTxGasLimit : globalFuncs.urlGet('gaslimit'),
// if there is no gasLimit or gas key in the URI, use the default value. Otherwise use value of gas or gasLimit. gasLimit wins over gas if both present
gasLimit: globalFuncs.urlGet('gaslimit') != null || globalFuncs.urlGet('gas') != null ? globalFuncs.urlGet('gaslimit') != null ? globalFuncs.urlGet('gaslimit') : globalFuncs.urlGet('gas') : globalFuncs.defaultTxGasLimit,
data: globalFuncs.urlGet('data') == null ? "" : globalFuncs.urlGet('data'),
to: globalFuncs.urlGet('to') == null ? "" : globalFuncs.urlGet('to'),
unit: "ether",
Expand All @@ -59,8 +60,8 @@ var sendTxCtrl = function($scope, $sce, walletService) {
donate: false,
tokenSymbol: globalFuncs.urlGet('tokenSymbol') == null ? false : globalFuncs.urlGet('tokenSymbol')
}
globalFuncs.urlGet('sendMode') == null ? $scope.setSendMode(0) : $scope.setSendMode(globalFuncs.urlGet('sendMode'));// 0 = ETH (Standard) 1 = Only ETH 2 = Only ETC 4 = Token
globalFuncs.urlGet('gaslimit') == null ? '' : $scope.showAdvance = true
globalFuncs.urlGet('sendMode') == null ? $scope.setSendMode(0) : $scope.setSendMode(globalFuncs.urlGet('sendMode')); // 0 = ETH (Standard) 1 = Only ETH 2 = Only ETC 4 = Token
globalFuncs.urlGet('gaslimit') == null || globalFuncs.urlGet('gas') != null ? '' : $scope.showAdvance = true
globalFuncs.urlGet('data') == null ? '' : $scope.showAdvance = true
$scope.$watch(function() {
if (walletService.wallet == null) return null;
Expand Down
7 changes: 4 additions & 3 deletions chrome-extension/js/etherwallet-master.js
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
$scope.dropdownAmount = false;
};
$scope.tx = {
gasLimit: globalFuncs.urlGet('gaslimit') == null ? globalFuncs.defaultTxGasLimit : globalFuncs.urlGet('gaslimit'),
// if there is no gasLimit or gas key in the URI, use the default value. Otherwise use value of gas or gasLimit. gasLimit wins over gas if both present
gasLimit: globalFuncs.urlGet('gaslimit') != null || globalFuncs.urlGet('gas') != null ? globalFuncs.urlGet('gaslimit') != null ? globalFuncs.urlGet('gaslimit') : globalFuncs.urlGet('gas') : globalFuncs.defaultTxGasLimit,
data: globalFuncs.urlGet('data') == null ? "" : globalFuncs.urlGet('data'),
to: globalFuncs.urlGet('to') == null ? "" : globalFuncs.urlGet('to'),
unit: "ether",
Expand All @@ -1294,8 +1295,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
donate: false,
tokenSymbol: globalFuncs.urlGet('tokenSymbol') == null ? false : globalFuncs.urlGet('tokenSymbol')
};
globalFuncs.urlGet('sendMode') == null ? $scope.setSendMode(0) : $scope.setSendMode(globalFuncs.urlGet('sendMode')); // 0 = ETH (Standard) 1 = Only ETH 2 = Only ETC 4 = Token
globalFuncs.urlGet('gaslimit') == null ? '' : $scope.showAdvance = true;
globalFuncs.urlGet('sendMode') == null ? $scope.setSendMode(0) : $scope.setSendMode(globalFuncs.urlGet('sendMode')); // 0 = ETH (Standard) 1 = Only ETH 2 = Only ETC 4 = Token
globalFuncs.urlGet('gaslimit') == null || globalFuncs.urlGet('gas') == null ? '' : $scope.showAdvance = true;
globalFuncs.urlGet('data') == null ? '' : $scope.showAdvance = true;
$scope.$watch(function () {
if (walletService.wallet == null) return null;
Expand Down
7 changes: 4 additions & 3 deletions dist/js/etherwallet-master.js
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
$scope.dropdownAmount = false;
};
$scope.tx = {
gasLimit: globalFuncs.urlGet('gaslimit') == null ? globalFuncs.defaultTxGasLimit : globalFuncs.urlGet('gaslimit'),
// if there is no gasLimit or gas key in the URI, use the default value. Otherwise use value of gas or gasLimit. gasLimit wins over gas if both present
gasLimit: globalFuncs.urlGet('gaslimit') != null || globalFuncs.urlGet('gas') != null ? globalFuncs.urlGet('gaslimit') != null ? globalFuncs.urlGet('gaslimit') : globalFuncs.urlGet('gas') : globalFuncs.defaultTxGasLimit,
data: globalFuncs.urlGet('data') == null ? "" : globalFuncs.urlGet('data'),
to: globalFuncs.urlGet('to') == null ? "" : globalFuncs.urlGet('to'),
unit: "ether",
Expand All @@ -1294,8 +1295,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
donate: false,
tokenSymbol: globalFuncs.urlGet('tokenSymbol') == null ? false : globalFuncs.urlGet('tokenSymbol')
};
globalFuncs.urlGet('sendMode') == null ? $scope.setSendMode(0) : $scope.setSendMode(globalFuncs.urlGet('sendMode')); // 0 = ETH (Standard) 1 = Only ETH 2 = Only ETC 4 = Token
globalFuncs.urlGet('gaslimit') == null ? '' : $scope.showAdvance = true;
globalFuncs.urlGet('sendMode') == null ? $scope.setSendMode(0) : $scope.setSendMode(globalFuncs.urlGet('sendMode')); // 0 = ETH (Standard) 1 = Only ETH 2 = Only ETC 4 = Token
globalFuncs.urlGet('gaslimit') == null || globalFuncs.urlGet('gas') == null ? '' : $scope.showAdvance = true;
globalFuncs.urlGet('data') == null ? '' : $scope.showAdvance = true;
$scope.$watch(function () {
if (walletService.wallet == null) return null;
Expand Down

0 comments on commit 81c7bb1

Please sign in to comment.