aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@users.noreply.github.com>2018-12-10 04:48:06 +0800
committerGitHub <noreply@github.com>2018-12-10 04:48:06 +0800
commitd8ab9cc002c10757b7382a174dafff7a0247e307 (patch)
treed0a46ac3ca2334ddec2ee240214d67a8122e81b7 /app
parent575fb607c3b8deea831aa28293303991b3f6be29 (diff)
downloadtangerine-wallet-browser-d8ab9cc002c10757b7382a174dafff7a0247e307.tar
tangerine-wallet-browser-d8ab9cc002c10757b7382a174dafff7a0247e307.tar.gz
tangerine-wallet-browser-d8ab9cc002c10757b7382a174dafff7a0247e307.tar.bz2
tangerine-wallet-browser-d8ab9cc002c10757b7382a174dafff7a0247e307.tar.lz
tangerine-wallet-browser-d8ab9cc002c10757b7382a174dafff7a0247e307.tar.xz
tangerine-wallet-browser-d8ab9cc002c10757b7382a174dafff7a0247e307.tar.zst
tangerine-wallet-browser-d8ab9cc002c10757b7382a174dafff7a0247e307.zip
Group transactions by nonce (#5886)
Diffstat (limited to 'app')
-rw-r--r--app/_locales/en/messages.json36
-rwxr-xr-xapp/images/icons/cancelled.svg3
-rw-r--r--app/images/icons/confirm.svg3
-rw-r--r--app/images/icons/error.svg4
-rwxr-xr-xapp/images/icons/new.svg3
-rwxr-xr-xapp/images/icons/retry.svg7
-rwxr-xr-xapp/images/icons/submitted.svg3
-rw-r--r--app/scripts/controllers/transactions/enums.js2
-rw-r--r--app/scripts/controllers/transactions/index.js6
-rw-r--r--app/scripts/metamask-controller.js14
10 files changed, 65 insertions, 16 deletions
diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json
index d23de5fa0..400633c8c 100644
--- a/app/_locales/en/messages.json
+++ b/app/_locales/en/messages.json
@@ -17,6 +17,9 @@
"confirmClear": {
"message": "Are you sure you want to clear approved websites?"
},
+ "contractInteraction": {
+ "message": "Contract Interaction"
+ },
"clearApprovalDataSuccess": {
"message": "Approved website data cleared successfully."
},
@@ -185,6 +188,9 @@
"cancellationGasFee": {
"message": "Cancellation Gas Fee"
},
+ "cancelled": {
+ "message": "Cancelled"
+ },
"cancelN": {
"message": "Cancel all $1 transactions"
},
@@ -1177,6 +1183,12 @@
"speedUpSubtitle": {
"message": "Increase your gas price to attempt to overwrite and speed up your transaction"
},
+ "speedUpCancellation": {
+ "message": "Speed up this cancellation"
+ },
+ "speedUpTransaction": {
+ "message": "Speed up this transaction"
+ },
"status": {
"message": "Status"
},
@@ -1263,29 +1275,38 @@
"message": "transaction"
},
"transactionConfirmed": {
- "message": "Transaction confirmed on $2."
+ "message": "Transaction confirmed at $2."
},
"transactionCreated": {
- "message": "Transaction created with a value of $1 on $2."
+ "message": "Transaction created with a value of $1 at $2."
},
"transactionWithNonce": {
"message": "Transaction $1"
},
"transactionDropped": {
- "message": "Transaction dropped on $2."
+ "message": "Transaction dropped at $2."
},
"transactionSubmitted": {
- "message": "Transaction submitted on $2."
+ "message": "Transaction submitted with gas fee of $1 at $2."
+ },
+ "transactionResubmitted": {
+ "message": "Transaction resubmitted with gas fee increased to $1 at $2"
},
"transactionUpdated": {
- "message": "Transaction updated on $2."
+ "message": "Transaction updated at $2."
},
"transactionUpdatedGas": {
- "message": "Transaction updated with a gas price of $1 on $2."
+ "message": "Transaction updated with a gas fee of $1 at $2."
},
"transactionErrored": {
"message": "Transaction encountered an error."
},
+ "transactionCancelAttempted": {
+ "message": "Transaction cancel attempted with gas fee of $1 at $2"
+ },
+ "transactionCancelSuccess": {
+ "message": "Transaction successfully cancelled at $2"
+ },
"transactions": {
"message": "transactions"
},
@@ -1350,9 +1371,6 @@
"unknown": {
"message": "Unknown"
},
- "unknownFunction": {
- "message": "Unknown Function"
- },
"unknownNetwork": {
"message": "Unknown Private Network"
},
diff --git a/app/images/icons/cancelled.svg b/app/images/icons/cancelled.svg
new file mode 100755
index 000000000..ae4846dde
--- /dev/null
+++ b/app/images/icons/cancelled.svg
@@ -0,0 +1,3 @@
+<svg width="7" height="8" viewBox="0 0 7 8" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M1.97959 1.19291C1.66717 0.880488 1.16063 0.880488 0.848215 1.19291C0.535796 1.50533 0.535796 2.01186 0.848215 2.32428L2.52394 4L0.848215 5.67572C0.535796 5.98814 0.535796 6.49467 0.848215 6.80709C1.16063 7.11951 1.66717 7.11951 1.97959 6.80709L3.65531 5.13137L5.33122 6.80728C5.64364 7.1197 6.15017 7.1197 6.46259 6.80728C6.77501 6.49486 6.77501 5.98833 6.46259 5.67591L4.78668 4L6.46259 2.32409C6.77501 2.01167 6.77501 1.50514 6.46259 1.19272C6.15017 0.880297 5.64364 0.880297 5.33122 1.19272L3.65531 2.86863L1.97959 1.19291Z" fill="#F9FBFF"/>
+</svg>
diff --git a/app/images/icons/confirm.svg b/app/images/icons/confirm.svg
new file mode 100644
index 000000000..3263bf03e
--- /dev/null
+++ b/app/images/icons/confirm.svg
@@ -0,0 +1,3 @@
+<svg width="7" height="5" viewBox="0 0 7 5" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M5.97989 0.212475C6.27337 0.495775 6.27337 0.955095 5.97989 1.23839L2.16061 4.92513L0.220114 3.05198C-0.0733712 2.76868 -0.0733712 2.30936 0.220114 2.02606C0.513599 1.74276 0.989432 1.74276 1.28292 2.02606L2.16061 2.87329L4.91708 0.212475C5.21057 -0.070825 5.6864 -0.070825 5.97989 0.212475Z" fill="white"/>
+</svg>
diff --git a/app/images/icons/error.svg b/app/images/icons/error.svg
new file mode 100644
index 000000000..bf5abf946
--- /dev/null
+++ b/app/images/icons/error.svg
@@ -0,0 +1,4 @@
+<svg width="2" height="8" viewBox="0 0 2 8" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect width="2" height="5" rx="1" fill="white"/>
+<rect y="6" width="2" height="2" rx="1" fill="white"/>
+</svg>
diff --git a/app/images/icons/new.svg b/app/images/icons/new.svg
new file mode 100755
index 000000000..f56c43e08
--- /dev/null
+++ b/app/images/icons/new.svg
@@ -0,0 +1,3 @@
+<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M1.76923 4.2003C1.3274 4.2003 0.969231 4.55847 0.969231 5.0003C0.969231 5.44213 1.3274 5.8003 1.76923 5.8003H4.20048V8.23077C4.20048 8.6726 4.55865 9.03077 5.00048 9.03077C5.44231 9.03077 5.80048 8.6726 5.80048 8.23077V5.8003H8.23077C8.6726 5.8003 9.03077 5.44213 9.03077 5.0003C9.03077 4.55847 8.6726 4.2003 8.23077 4.2003L5.80048 4.2003L5.80048 1.76923C5.80048 1.3274 5.44231 0.969229 5.00048 0.969229C4.55865 0.969229 4.20048 1.3274 4.20048 1.76923V4.2003H1.76923Z" fill="#F9FBFF"/>
+</svg>
diff --git a/app/images/icons/retry.svg b/app/images/icons/retry.svg
new file mode 100755
index 000000000..ddaa198ca
--- /dev/null
+++ b/app/images/icons/retry.svg
@@ -0,0 +1,7 @@
+<svg width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg">
+<mask id="path-1-inside-1" fill="white">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M0.778067 3.8208C0.871457 2.12275 2.27987 0.769234 4 0.769234C4.96355 0.769234 5.83056 1.19264 6.42308 1.86404V1.25385C6.42056 1.07527 6.56316 0.928879 6.74111 0.926355C6.82882 0.925093 6.91274 0.959168 6.97458 1.02101C7.03642 1.08285 7.0705 1.16677 7.06923 1.25385V2.86923H6.57641C6.53919 2.87554 6.50196 2.87554 6.46536 2.86923H5.45385C5.33711 2.87113 5.22921 2.80992 5.17053 2.70896C5.11121 2.60863 5.11121 2.48369 5.17053 2.38336C5.22921 2.2824 5.33711 2.22119 5.45385 2.22308H5.87536C5.40526 1.72648 4.74081 1.41539 4 1.41539C2.61746 1.41539 1.49805 2.49378 1.42296 3.85613C1.41854 3.97224 1.35103 4.07699 1.24754 4.12999C1.14405 4.183 1.01974 4.17605 0.92257 4.11232C0.825394 4.04796 0.770495 3.9369 0.778067 3.8208ZM6.57705 4.14387C6.58399 3.96529 6.73417 3.82647 6.91274 3.83404C6.99982 3.83783 7.08185 3.87632 7.14054 3.94132C7.19859 4.00631 7.22825 4.09213 7.22194 4.17921C7.12855 5.87725 5.72014 7.23077 4 7.23077C3.03645 7.23077 2.16944 6.80736 1.57693 6.13597V6.74615C1.57882 6.86289 1.51761 6.97079 1.41665 7.02948C1.31632 7.08879 1.19138 7.08879 1.09105 7.02948C0.990088 6.97079 0.928879 6.86289 0.930771 6.74615V5.13077H1.42927C1.46335 5.12572 1.49742 5.12572 1.53149 5.13077H2.54616C2.66289 5.12888 2.7708 5.19008 2.82948 5.29104C2.88879 5.39138 2.88879 5.51632 2.82948 5.61665C2.7708 5.71761 2.66289 5.77882 2.54616 5.77692H2.12464C2.59538 6.27353 3.2592 6.58461 4 6.58461C5.38254 6.58461 6.50196 5.50622 6.57705 4.14387Z"/>
+</mask>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M0.778067 3.8208C0.871457 2.12275 2.27987 0.769234 4 0.769234C4.96355 0.769234 5.83056 1.19264 6.42308 1.86404V1.25385C6.42056 1.07527 6.56316 0.928879 6.74111 0.926355C6.82882 0.925093 6.91274 0.959168 6.97458 1.02101C7.03642 1.08285 7.0705 1.16677 7.06923 1.25385V2.86923H6.57641C6.53919 2.87554 6.50196 2.87554 6.46536 2.86923H5.45385C5.33711 2.87113 5.22921 2.80992 5.17053 2.70896C5.11121 2.60863 5.11121 2.48369 5.17053 2.38336C5.22921 2.2824 5.33711 2.22119 5.45385 2.22308H5.87536C5.40526 1.72648 4.74081 1.41539 4 1.41539C2.61746 1.41539 1.49805 2.49378 1.42296 3.85613C1.41854 3.97224 1.35103 4.07699 1.24754 4.12999C1.14405 4.183 1.01974 4.17605 0.92257 4.11232C0.825394 4.04796 0.770495 3.9369 0.778067 3.8208ZM6.57705 4.14387C6.58399 3.96529 6.73417 3.82647 6.91274 3.83404C6.99982 3.83783 7.08185 3.87632 7.14054 3.94132C7.19859 4.00631 7.22825 4.09213 7.22194 4.17921C7.12855 5.87725 5.72014 7.23077 4 7.23077C3.03645 7.23077 2.16944 6.80736 1.57693 6.13597V6.74615C1.57882 6.86289 1.51761 6.97079 1.41665 7.02948C1.31632 7.08879 1.19138 7.08879 1.09105 7.02948C0.990088 6.97079 0.928879 6.86289 0.930771 6.74615V5.13077H1.42927C1.46335 5.12572 1.49742 5.12572 1.53149 5.13077H2.54616C2.66289 5.12888 2.7708 5.19008 2.82948 5.29104C2.88879 5.39138 2.88879 5.51632 2.82948 5.61665C2.7708 5.71761 2.66289 5.77882 2.54616 5.77692H2.12464C2.59538 6.27353 3.2592 6.58461 4 6.58461C5.38254 6.58461 6.50196 5.50622 6.57705 4.14387Z" fill="#F9FBFF"/>
+<path d="M0.778067 3.8208L1.776 3.88588L1.77656 3.87571L0.778067 3.8208ZM6.42308 1.86404L5.6733 2.52573L7.42308 4.50843V1.86404H6.42308ZM6.42308 1.25385H7.42318L7.42298 1.23972L6.42308 1.25385ZM6.74111 0.926355L6.75529 1.92625L6.75549 1.92625L6.74111 0.926355ZM6.97458 1.02101L6.26747 1.72811L6.26748 1.72812L6.97458 1.02101ZM7.06923 1.25385L6.06934 1.23935L6.06923 1.2466V1.25385H7.06923ZM7.06923 2.86923V3.86923H8.06923V2.86923H7.06923ZM6.57641 2.86923V1.86923H6.49227L6.40931 1.88329L6.57641 2.86923ZM6.46536 2.86923L6.63526 1.88377L6.55093 1.86923H6.46536V2.86923ZM5.45385 2.86923V1.86923H5.44574L5.43763 1.86937L5.45385 2.86923ZM5.17053 2.70896L6.03511 2.20642L6.03134 2.20005L5.17053 2.70896ZM5.17053 2.38336L6.03137 2.89228L6.03509 2.88588L5.17053 2.38336ZM5.45385 2.22308L5.43763 3.22295L5.44574 3.22308H5.45385V2.22308ZM5.87536 2.22308V3.22308H8.19899L6.60158 1.53562L5.87536 2.22308ZM1.42296 3.85613L0.424475 3.8011L0.424006 3.8096L0.423682 3.81811L1.42296 3.85613ZM1.24754 4.12999L0.791666 3.23995L0.791661 3.23995L1.24754 4.12999ZM0.92257 4.11232L0.370365 4.94604L0.374142 4.94852L0.92257 4.11232ZM6.91274 3.83404L6.95618 2.83499L6.95511 2.83494L6.91274 3.83404ZM6.57705 4.14387L7.57553 4.1989L7.57598 4.19081L7.57629 4.18271L6.57705 4.14387ZM7.14054 3.94132L7.88636 3.27515L7.88276 3.27116L7.14054 3.94132ZM7.22194 4.17921L6.22455 4.10692L6.22392 4.1156L6.22345 4.12429L7.22194 4.17921ZM1.57693 6.13597L2.3267 5.47428L0.576926 3.49157V6.13597H1.57693ZM1.57693 6.74615H0.576926V6.75426L0.577057 6.76238L1.57693 6.74615ZM1.41665 7.02948L0.91411 6.16489L0.907735 6.16866L1.41665 7.02948ZM1.09105 7.02948L1.59998 6.16864L1.59358 6.16492L1.09105 7.02948ZM0.930771 6.74615L1.93064 6.76236L1.93077 6.75426V6.74615H0.930771ZM0.930771 5.13077V4.13077H-0.0692286V5.13077H0.930771ZM1.42927 5.13077V6.13077H1.50294L1.57582 6.11997L1.42927 5.13077ZM1.53149 5.13077L1.38494 6.11997L1.45782 6.13077H1.53149V5.13077ZM2.54616 5.13077V6.13077H2.55426L2.56237 6.13064L2.54616 5.13077ZM2.82948 5.29104L1.96489 5.79358L1.96866 5.79996L2.82948 5.29104ZM2.82948 5.61665L1.96864 5.10772L1.96492 5.11412L2.82948 5.61665ZM2.54616 5.77692L2.56237 4.77705L2.55426 4.77692H2.54616V5.77692ZM2.12464 5.77692V4.77692H-0.201132L1.39888 6.46487L2.12464 5.77692ZM4 -0.230766C1.74426 -0.230766 -0.098134 1.54236 -0.220424 3.76588L1.77656 3.87571C1.84105 2.70314 2.81549 1.76923 4 1.76923V-0.230766ZM7.17286 1.20234C6.39879 0.325232 5.26272 -0.230766 4 -0.230766V1.76923C4.66439 1.76923 5.26233 2.06005 5.6733 2.52573L7.17286 1.20234ZM5.42308 1.25385V1.86404H7.42308V1.25385H5.42308ZM6.72693 -0.0735444C5.99673 -0.0631869 5.41285 0.537233 5.42318 1.26798L7.42298 1.23972C7.42826 1.61331 7.12959 1.92095 6.75529 1.92625L6.72693 -0.0735444ZM7.68169 0.313905C7.42857 0.0607823 7.08431 -0.0786862 6.72672 -0.0735415L6.75549 1.92625C6.57333 1.92887 6.39691 1.85755 6.26747 1.72811L7.68169 0.313905ZM8.06913 1.26835C8.07432 0.910271 7.93407 0.566273 7.68168 0.313893L6.26748 1.72812C6.13878 1.59942 6.06667 1.42327 6.06934 1.23935L8.06913 1.26835ZM8.06923 2.86923V1.25385H6.06923V2.86923H8.06923ZM6.57641 3.86923H7.06923V1.86923H6.57641V3.86923ZM6.29545 3.85469C6.44544 3.88055 6.59664 3.88007 6.74352 3.85517L6.40931 1.88329C6.48173 1.87102 6.55847 1.87053 6.63526 1.88377L6.29545 3.85469ZM5.45385 3.86923H6.46536V1.86923H5.45385V3.86923ZM4.30596 3.21148C4.54571 3.62395 4.98964 3.87689 5.47006 3.8691L5.43763 1.86937C5.68458 1.86536 5.91271 1.99589 6.03509 2.20643L4.30596 3.21148ZM4.30971 1.87445C4.06482 2.28867 4.06482 2.80364 4.30971 3.21787L6.03134 2.20005C6.1576 2.41361 6.1576 2.6787 6.03134 2.89227L4.30971 1.87445ZM5.47006 1.22321C4.98964 1.21542 4.54571 1.46836 4.30596 1.88083L6.03509 2.88588C5.91271 3.09643 5.68458 3.22695 5.43763 3.22295L5.47006 1.22321ZM5.87536 1.22308H5.45385V3.22308H5.87536V1.22308ZM4 2.41539C4.45384 2.41539 4.85932 2.60438 5.14914 2.91054L6.60158 1.53562C5.9512 0.84857 5.02778 0.415388 4 0.415388V2.41539ZM2.42144 3.91117C2.46762 3.07348 3.15379 2.41539 4 2.41539V0.415388C2.08113 0.415388 0.528483 1.91409 0.424475 3.8011L2.42144 3.91117ZM1.70341 5.02004C2.12497 4.80412 2.40391 4.37587 2.42224 3.89415L0.423682 3.81811C0.433175 3.5686 0.577079 3.34986 0.791666 3.23995L1.70341 5.02004ZM0.374142 4.94852C0.770549 5.20851 1.27824 5.2378 1.70342 5.02003L0.791661 3.23995C1.00986 3.12819 1.26894 3.1436 1.471 3.27612L0.374142 4.94852ZM-0.219813 3.75572C-0.250677 4.22897 -0.0263505 4.68327 0.370371 4.94603L1.47477 3.27861C1.67714 3.41265 1.79167 3.64484 1.77595 3.88588L-0.219813 3.75572ZM6.95511 2.83494C6.22187 2.80385 5.60619 3.37471 5.5778 4.10503L7.57629 4.18271C7.56179 4.55588 7.24647 4.84909 6.87038 4.83315L6.95511 2.83494ZM7.88276 3.27116C7.64442 3.0072 7.31059 2.8504 6.95618 2.83499L6.86931 4.8331C6.68906 4.82526 6.51928 4.74545 6.39832 4.61147L7.88276 3.27116ZM8.21932 4.2515C8.24543 3.89125 8.12269 3.53976 7.88635 3.27516L6.39472 4.60747C6.27449 4.47286 6.21107 4.293 6.22455 4.10692L8.21932 4.2515ZM4 8.23077C6.25575 8.23077 8.09814 6.45764 8.22043 4.23412L6.22345 4.12429C6.15896 5.29686 5.18452 6.23077 4 6.23077V8.23077ZM0.82715 6.79766C1.60122 7.67477 2.73729 8.23077 4 8.23077V6.23077C3.33561 6.23077 2.73767 5.93995 2.3267 5.47428L0.82715 6.79766ZM2.57693 6.74615V6.13597H0.576926V6.74615H2.57693ZM1.91918 7.89404C2.33164 7.6543 2.58459 7.21037 2.57679 6.72993L0.577057 6.76238C0.573051 6.51541 0.703586 6.28729 0.914124 6.16491L1.91918 7.89404ZM0.582134 7.89029C0.996363 8.13519 1.51133 8.13519 1.92556 7.89029L0.907735 6.16866C1.1213 6.0424 1.38639 6.0424 1.59996 6.16866L0.582134 7.89029ZM-0.0690972 6.72995C-0.076884 7.21037 0.17606 7.65429 0.588515 7.89403L1.59358 6.16492C1.80412 6.28729 1.93464 6.51541 1.93064 6.76236L-0.0690972 6.72995ZM-0.0692286 5.13077V6.74615H1.93077V5.13077H-0.0692286ZM1.42927 4.13077H0.930771V6.13077H1.42927V4.13077ZM1.67805 4.14157C1.5468 4.12212 1.41396 4.12212 1.28272 4.14157L1.57582 6.11997C1.51273 6.12932 1.44804 6.12932 1.38494 6.11997L1.67805 4.14157ZM2.54616 4.13077H1.53149V6.13077H2.54616V4.13077ZM3.69404 4.78852C3.4543 4.37605 3.01037 4.12311 2.52994 4.1309L2.56237 6.13064C2.31542 6.13464 2.08729 6.00411 1.96492 5.79357L3.69404 4.78852ZM3.6903 6.12556C3.93519 5.71133 3.93519 5.19636 3.6903 4.78213L1.96866 5.79996C1.8424 5.58639 1.8424 5.3213 1.96866 5.10773L3.6903 6.12556ZM2.52994 6.77679C3.01036 6.78458 3.4543 6.53164 3.69404 6.11917L1.96492 5.11412C2.08729 4.90358 2.31542 4.77305 2.56237 4.77705L2.52994 6.77679ZM2.12464 6.77692H2.54616V4.77692H2.12464V6.77692ZM4 5.58461C3.54654 5.58461 3.14132 5.39588 2.8504 5.08897L1.39888 6.46487C2.04943 7.15117 2.97185 7.58461 4 7.58461V5.58461ZM5.57856 4.08883C5.53239 4.92653 4.84621 5.58461 4 5.58461V7.58461C5.91888 7.58461 7.47152 6.08591 7.57553 4.1989L5.57856 4.08883Z" fill="white" mask="url(#path-1-inside-1)"/>
+</svg>
diff --git a/app/images/icons/submitted.svg b/app/images/icons/submitted.svg
new file mode 100755
index 000000000..b5ced8777
--- /dev/null
+++ b/app/images/icons/submitted.svg
@@ -0,0 +1,3 @@
+<svg width="7" height="6" viewBox="0 0 7 6" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M5.24834 0.0498428C5.69016 0.0498428 6.04834 0.408016 6.04834 0.849844L6.04834 4.84984C6.04834 5.29167 5.69016 5.64984 5.24834 5.64984C4.80651 5.64984 4.44834 5.29167 4.44834 4.84984V2.68278L1.56558 5.56553C1.25316 5.87795 0.746632 5.87795 0.434212 5.56553C0.121793 5.25311 0.121793 4.74658 0.434212 4.43416L3.21853 1.64984L1.24834 1.64984C0.806507 1.64984 0.448335 1.29167 0.448335 0.849844C0.448335 0.408016 0.806507 0.0498428 1.24834 0.0498428L5.24834 0.0498428Z" fill="#F9FBFF"/>
+</svg>
diff --git a/app/scripts/controllers/transactions/enums.js b/app/scripts/controllers/transactions/enums.js
index be6f16e0d..d41400b9f 100644
--- a/app/scripts/controllers/transactions/enums.js
+++ b/app/scripts/controllers/transactions/enums.js
@@ -3,10 +3,12 @@ const TRANSACTION_TYPE_RETRY = 'retry'
const TRANSACTION_TYPE_STANDARD = 'standard'
const TRANSACTION_STATUS_APPROVED = 'approved'
+const TRANSACTION_STATUS_CONFIRMED = 'confirmed'
module.exports = {
TRANSACTION_TYPE_CANCEL,
TRANSACTION_TYPE_RETRY,
TRANSACTION_TYPE_STANDARD,
TRANSACTION_STATUS_APPROVED,
+ TRANSACTION_STATUS_CONFIRMED,
}
diff --git a/app/scripts/controllers/transactions/index.js b/app/scripts/controllers/transactions/index.js
index f530fbd22..2ce736beb 100644
--- a/app/scripts/controllers/transactions/index.js
+++ b/app/scripts/controllers/transactions/index.js
@@ -230,13 +230,15 @@ class TransactionController extends EventEmitter {
to allow the user to resign the transaction with a higher gas values
@param originalTxId {number} - the id of the txMeta that
you want to attempt to retry
+ @param gasPrice {string=} - Optional gas price to be increased to use as the retry
+ transaction's gas price
@return {txMeta}
*/
- async retryTransaction (originalTxId) {
+ async retryTransaction (originalTxId, gasPrice) {
const originalTxMeta = this.txStateManager.getTx(originalTxId)
const { txParams } = originalTxMeta
- const lastGasPrice = originalTxMeta.txParams.gasPrice
+ const lastGasPrice = gasPrice || originalTxMeta.txParams.gasPrice
const suggestedGasPriceBN = new ethUtil.BN(ethUtil.stripHexPrefix(this.getGasPrice()), 16)
const lastGasPriceBN = new ethUtil.BN(ethUtil.stripHexPrefix(lastGasPrice), 16)
// essentially lastGasPrice * 1.1 but
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index d382b1ad0..c7e9cfcc7 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -1144,8 +1144,8 @@ module.exports = class MetamaskController extends EventEmitter {
* @param {string} txId - The ID of the transaction to speed up.
* @param {Function} cb - The callback function called with a full state update.
*/
- async retryTransaction (txId, cb) {
- await this.txController.retryTransaction(txId)
+ async retryTransaction (txId, gasPrice, cb) {
+ await this.txController.retryTransaction(txId, gasPrice)
const state = await this.getState()
return state
}
@@ -1158,9 +1158,13 @@ module.exports = class MetamaskController extends EventEmitter {
* @returns {object} MetaMask state
*/
async createCancelTransaction (originalTxId, customGasPrice, cb) {
- await this.txController.createCancelTransaction(originalTxId, customGasPrice)
- const state = await this.getState()
- return state
+ try {
+ await this.txController.createCancelTransaction(originalTxId, customGasPrice)
+ const state = await this.getState()
+ return state
+ } catch (error) {
+ throw error
+ }
}
async createSpeedUpTransaction (originalTxId, customGasPrice, cb) {