aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-09-18 01:34:29 +0800
committerAlexander Tseung <alextsg@gmail.com>2018-09-20 05:31:10 +0800
commit5a6c333506e4000602c1a1106cee6d06fe83afa8 (patch)
tree2aed850f17114372eaca16ed7e77f42f87907713 /app
parent3e470fee8a5560b605f7ad1060fb1eebafefd21e (diff)
downloadtangerine-wallet-browser-5a6c333506e4000602c1a1106cee6d06fe83afa8.tar.gz
tangerine-wallet-browser-5a6c333506e4000602c1a1106cee6d06fe83afa8.tar.zst
tangerine-wallet-browser-5a6c333506e4000602c1a1106cee6d06fe83afa8.zip
Switch existing modals from using Notification to Modal. Remove Notification component. Add CancelTransaction modal
Diffstat (limited to 'app')
-rw-r--r--app/_locales/en/messages.json15
-rw-r--r--app/scripts/controllers/transactions/index.js5
2 files changed, 18 insertions, 2 deletions
diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json
index 2cfd15f50..ed2e7a119 100644
--- a/app/_locales/en/messages.json
+++ b/app/_locales/en/messages.json
@@ -61,6 +61,12 @@
"attemptingConnect": {
"message": "Attempting to connect to blockchain."
},
+ "attemptToCancel": {
+ "message": "Attempt to Cancel?"
+ },
+ "attemptToCancelDescription": {
+ "message": "Attempting to cancel does not guarantee your original transaction will be cancelled. If cancelled, you are still required to pay a transaction fee to the network."
+ },
"attributions": {
"message": "Attributions"
},
@@ -116,6 +122,12 @@
"cancel": {
"message": "Cancel"
},
+ "cancelAttempt": {
+ "message": "Cancel Attempt"
+ },
+ "cancellationGasFee": {
+ "message": "Cancellation Gas Fee"
+ },
"classicInterface": {
"message": "Use classic interface"
},
@@ -1228,6 +1240,9 @@
"whatsThis": {
"message": "What's this?"
},
+ "yesLetsTry": {
+ "message": "yes, let's try"
+ },
"youNeedToAllowCameraAccess": {
"message": "You need to allow camera access to use this feature."
},
diff --git a/app/scripts/controllers/transactions/index.js b/app/scripts/controllers/transactions/index.js
index 59e30cdde..e2965ceb6 100644
--- a/app/scripts/controllers/transactions/index.js
+++ b/app/scripts/controllers/transactions/index.js
@@ -18,7 +18,7 @@ const {
TRANSACTION_STATUS_APPROVED,
} = require('./enums')
-const { hexToBn, bnToHex } = require('../../lib/util')
+const { hexToBn, bnToHex, BnMultiplyByFraction } = require('../../lib/util')
/**
Transaction Controller is an aggregate of sub-controllers and trackers
@@ -244,7 +244,8 @@ class TransactionController extends EventEmitter {
const originalTxMeta = this.txStateManager.getTx(originalTxId)
const { txParams } = originalTxMeta
const { gasPrice: lastGasPrice, from, nonce } = txParams
- const newGasPrice = customGasPrice || bnToHex(hexToBn(lastGasPrice).mul(1.1))
+
+ const newGasPrice = customGasPrice || bnToHex(BnMultiplyByFraction(hexToBn(lastGasPrice), 11, 10))
const newTxMeta = this.txStateManager.generateTxMeta({
txParams: {
from,