aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/selectors
diff options
context:
space:
mode:
authorDan Miller <danjm.com@gmail.com>2018-10-25 11:55:39 +0800
committerDan Miller <danjm.com@gmail.com>2018-12-04 11:36:05 +0800
commit3162a2747c0e54f729405caaef777519e4ded4dc (patch)
tree8a4b827f2fadddd1a6e12eddd3f0b05a15c67832 /ui/app/selectors
parent3ced3c9b2ab75038163f82eb77fbf97ea78d2342 (diff)
downloadtangerine-wallet-browser-3162a2747c0e54f729405caaef777519e4ded4dc.tar
tangerine-wallet-browser-3162a2747c0e54f729405caaef777519e4ded4dc.tar.gz
tangerine-wallet-browser-3162a2747c0e54f729405caaef777519e4ded4dc.tar.bz2
tangerine-wallet-browser-3162a2747c0e54f729405caaef777519e4ded4dc.tar.lz
tangerine-wallet-browser-3162a2747c0e54f729405caaef777519e4ded4dc.tar.xz
tangerine-wallet-browser-3162a2747c0e54f729405caaef777519e4ded4dc.tar.zst
tangerine-wallet-browser-3162a2747c0e54f729405caaef777519e4ded4dc.zip
Redesign of gas customization basic tab.
Diffstat (limited to 'ui/app/selectors')
-rw-r--r--ui/app/selectors/custom-gas.js3
-rw-r--r--ui/app/selectors/tests/custom-gas.test.js6
2 files changed, 9 insertions, 0 deletions
diff --git a/ui/app/selectors/custom-gas.js b/ui/app/selectors/custom-gas.js
index 46bf06efc..1c577c1b4 100644
--- a/ui/app/selectors/custom-gas.js
+++ b/ui/app/selectors/custom-gas.js
@@ -189,18 +189,21 @@ function getRenderableBasicEstimateData (state) {
return [
{
+ labelKey: 'fastest',
feeInPrimaryCurrency: getRenderableConvertedCurrencyFee(fast, gasLimit, currentCurrency, conversionRate),
feeInSecondaryCurrency: getRenderableEthFee(fast, gasLimit),
timeEstimate: getRenderableTimeEstimate(fastWait, blockTime),
priceInHexWei: getGasPriceInHexWei(fast),
},
{
+ labelKey: 'fast',
feeInPrimaryCurrency: getRenderableConvertedCurrencyFee(average, gasLimit, currentCurrency, conversionRate),
feeInSecondaryCurrency: getRenderableEthFee(average, gasLimit),
timeEstimate: getRenderableTimeEstimate(avgWait, blockTime),
priceInHexWei: getGasPriceInHexWei(average),
},
{
+ labelKey: 'slow',
feeInPrimaryCurrency: getRenderableConvertedCurrencyFee(safeLow, gasLimit, currentCurrency, conversionRate),
feeInSecondaryCurrency: getRenderableEthFee(safeLow, gasLimit),
timeEstimate: getRenderableTimeEstimate(safeLowWait, blockTime),
diff --git a/ui/app/selectors/tests/custom-gas.test.js b/ui/app/selectors/tests/custom-gas.test.js
index 1099670f2..8a6e7e351 100644
--- a/ui/app/selectors/tests/custom-gas.test.js
+++ b/ui/app/selectors/tests/custom-gas.test.js
@@ -77,18 +77,21 @@ describe('custom-gas selectors', () => {
{
expectedResult: [
{
+ labelKey: 'fastest',
feeInPrimaryCurrency: '$0.05',
feeInSecondaryCurrency: '0.00021 ETH',
timeEstimate: '~7 sec',
priceInHexWei: '0x2540be400',
},
{
+ labelKey: 'fast',
feeInPrimaryCurrency: '$0.03',
feeInSecondaryCurrency: '0.000105 ETH',
timeEstimate: '~46 sec',
priceInHexWei: '0x12a05f200',
},
{
+ labelKey: 'slow',
feeInPrimaryCurrency: '$0.01',
feeInSecondaryCurrency: '0.0000525 ETH',
timeEstimate: '~1 min 33 sec',
@@ -119,18 +122,21 @@ describe('custom-gas selectors', () => {
{
expectedResult: [
{
+ labelKey: 'fastest',
feeInPrimaryCurrency: '$1.07',
feeInSecondaryCurrency: '0.00042 ETH',
timeEstimate: '~14 sec',
priceInHexWei: '0x4a817c800',
},
{
+ labelKey: 'fast',
feeInPrimaryCurrency: '$0.54',
feeInSecondaryCurrency: '0.00021 ETH',
timeEstimate: '~1 min 33 sec',
priceInHexWei: '0x2540be400',
},
{
+ labelKey: 'slow',
feeInPrimaryCurrency: '$0.27',
feeInSecondaryCurrency: '0.000105 ETH',
timeEstimate: '~3 min 7 sec',