From da862de097351cebd0016fccc85ea680c473dfb8 Mon Sep 17 00:00:00 2001 From: gamalielhere Date: Wed, 31 Oct 2018 14:57:35 -0700 Subject: [PATCH 1/3] Fixes the display issue when generating a tx --- CHANGELOG.md | 1 + app/scripts/controllers/offlineTxCtrl.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fb26369f3..d2de25d32d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Devop +- Fixes gasPrice when generating offline. []() - Update u2f-api [#2135](https://github.com/kvhnuke/etherwallet/pull/2135) ### Release v3.24.0 diff --git a/app/scripts/controllers/offlineTxCtrl.js b/app/scripts/controllers/offlineTxCtrl.js index 2af4d55058..7a1b454697 100644 --- a/app/scripts/controllers/offlineTxCtrl.js +++ b/app/scripts/controllers/offlineTxCtrl.js @@ -74,7 +74,7 @@ var offlineTxCtrl = function($scope, $sce, walletService) { ajaxReq.getTransactionData($scope.tx.from, function(data) { if (data.error) throw data.msg; data = data.data; - $scope.gasPriceDec = ethFuncs.hexToDecimal(ethFuncs.sanitizeHex(ethFuncs.addTinyMoreToGas(data.gasprice))); + $scope.gasPriceDec = $scope.gasPriceDef === 'GWEI' ? etherUnits.toGwei(data.gasprice, 'wei'):ethFuncs.hexToDecimal(ethFuncs.sanitizeHex(ethFuncs.addTinyMoreToGas(data.gasprice))); $scope.nonceDec = ethFuncs.hexToDecimal(data.nonce); $scope.showWalletInfo = true; }); From 599b8f48dda337299ab074467007fe256f15f146 Mon Sep 17 00:00:00 2001 From: gamalielhere Date: Wed, 31 Oct 2018 15:05:33 -0700 Subject: [PATCH 2/3] Update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2de25d32d..84c603f00a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### Devop -- Fixes gasPrice when generating offline. []() +- Fixes gasPrice when generating offline. [#2134](https://github.com/kvhnuke/etherwallet/pull/2134) - Update u2f-api [#2135](https://github.com/kvhnuke/etherwallet/pull/2135) ### Release v3.24.0 From d058758a756be14f7733612990bc8bc06509d489 Mon Sep 17 00:00:00 2001 From: gamalielhere Date: Fri, 2 Nov 2018 13:09:13 -0700 Subject: [PATCH 3/3] Use existing functions to get gasPrice --- app/scripts/controllers/offlineTxCtrl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/controllers/offlineTxCtrl.js b/app/scripts/controllers/offlineTxCtrl.js index 7a1b454697..3f6f092dce 100644 --- a/app/scripts/controllers/offlineTxCtrl.js +++ b/app/scripts/controllers/offlineTxCtrl.js @@ -74,7 +74,7 @@ var offlineTxCtrl = function($scope, $sce, walletService) { ajaxReq.getTransactionData($scope.tx.from, function(data) { if (data.error) throw data.msg; data = data.data; - $scope.gasPriceDec = $scope.gasPriceDef === 'GWEI' ? etherUnits.toGwei(data.gasprice, 'wei'):ethFuncs.hexToDecimal(ethFuncs.sanitizeHex(ethFuncs.addTinyMoreToGas(data.gasprice))); + $scope.gasPriceDec = $scope.gasPriceDef === "GWEI" ? etherUnits.toGwei(ethFuncs.hexToDecimal(ethFuncs.sanitizeHex(ethFuncs.addTinyMoreToGas(data.gasprice))), "wei") : ethFuncs.hexToDecimal(ethFuncs.sanitizeHex(ethFuncs.addTinyMoreToGas(data.gasprice))); $scope.nonceDec = ethFuncs.hexToDecimal(data.nonce); $scope.showWalletInfo = true; });