aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Wei <chenwei@byzantine-lab.io>2019-07-03 14:27:02 +0800
committerChen Wei <chenwei@byzantine-lab.io>2019-07-03 14:27:02 +0800
commit20e9132dcdc6910302dde7378ba6e6ce28603519 (patch)
treecc656550c779bae973b88f67b4cc6690d8f009c7
parent9063fba5314a18e057125efcaaac2441e7d13a74 (diff)
downloadtangerine-wallet-browser-20e9132dcdc6910302dde7378ba6e6ce28603519.tar.gz
tangerine-wallet-browser-20e9132dcdc6910302dde7378ba6e6ce28603519.tar.zst
tangerine-wallet-browser-20e9132dcdc6910302dde7378ba6e6ce28603519.zip
it seems safer to have workaround in UI layer instead of changing the constants or logic
-rw-r--r--ui/app/components/app/gas-customization/gas-price-button-group/gas-price-button-group.component.js5
-rw-r--r--ui/app/components/ui/currency-display/currency-display.component.js3
-rw-r--r--ui/app/components/ui/unit-input/unit-input.component.js2
-rw-r--r--ui/app/ducks/gas/gas.duck.js18
-rw-r--r--ui/app/pages/first-time-flow/welcome/welcome.component.js4
-rw-r--r--ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js2
6 files changed, 10 insertions, 24 deletions
diff --git a/ui/app/components/app/gas-customization/gas-price-button-group/gas-price-button-group.component.js b/ui/app/components/app/gas-customization/gas-price-button-group/gas-price-button-group.component.js
index 14952a49a..1febef2e5 100644
--- a/ui/app/components/app/gas-customization/gas-price-button-group/gas-price-button-group.component.js
+++ b/ui/app/components/app/gas-customization/gas-price-button-group/gas-price-button-group.component.js
@@ -39,7 +39,10 @@ export default class GasPriceButtonGroup extends Component {
return (<div>
{ labelKey && <div className={`${className}__label`}>{ this.context.t(labelKey) }</div> }
{ timeEstimate && <div className={`${className}__time-estimate`}>{ timeEstimate }</div> }
- { feeInPrimaryCurrency && <div className={`${className}__primary-currency`}>{ feeInPrimaryCurrency }</div> }
+ {feeInPrimaryCurrency && (
+ <div className={`${className}__primary-currency`}>
+ { feeInPrimaryCurrency.replace('ETH', 'TAN') }
+ </div>)}
{ feeInSecondaryCurrency && <div className={`${className}__secondary-currency`}>{ feeInSecondaryCurrency }</div> }
{ showCheck && <div className="button-check-wrapper"><i className="fa fa-check fa-sm" /></div> }
</div>)
diff --git a/ui/app/components/ui/currency-display/currency-display.component.js b/ui/app/components/ui/currency-display/currency-display.component.js
index c15668da3..ce3bb1351 100644
--- a/ui/app/components/ui/currency-display/currency-display.component.js
+++ b/ui/app/components/ui/currency-display/currency-display.component.js
@@ -36,7 +36,8 @@ export default class CurrencyDisplay extends PureComponent {
{
suffix && (
<span className="currency-display-component__suffix">
- { suffix }
+ {/* This might be the safiest workaround XD */}
+ { (suffix === 'ETH') ? 'TAN' : suffix }
</span>
)
}
diff --git a/ui/app/components/ui/unit-input/unit-input.component.js b/ui/app/components/ui/unit-input/unit-input.component.js
index 9085a0677..be1d0a5d0 100644
--- a/ui/app/components/ui/unit-input/unit-input.component.js
+++ b/ui/app/components/ui/unit-input/unit-input.component.js
@@ -96,7 +96,7 @@ export default class UnitInput extends PureComponent {
{
suffix && (
<div className="unit-input__suffix">
- { suffix }
+ { (suffix === 'ETH') ? 'TAN' : suffix}
</div>
)
}
diff --git a/ui/app/ducks/gas/gas.duck.js b/ui/app/ducks/gas/gas.duck.js
index 911d0ece8..bcb9a8450 100644
--- a/ui/app/ducks/gas/gas.duck.js
+++ b/ui/app/ducks/gas/gas.duck.js
@@ -177,24 +177,6 @@ export function gasEstimatesLoadingFinished () {
}
}
-fetch('https://testnet-rpc.tangerine-network.io', {
- 'headers': {
- 'Content-Type': 'application/json',
- },
- 'body': '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":67}',
- 'method': 'POST',
-})
-.then(r => r.json())
-.then(({ result }) => {
- console.log(result)
- try {
- const gasEstimate = parseInt(hexToNumberString(result).slice(0, -9))
- console.log('RES FROM TANGERINE RPC!!!!!', result, gasEstimate)
- } catch (e) {
- console.log('error', result, e)
- }
-})
-
export function fetchBasicGasEstimates () {
return (dispatch, getState) => {
const {
diff --git a/ui/app/pages/first-time-flow/welcome/welcome.component.js b/ui/app/pages/first-time-flow/welcome/welcome.component.js
index 79b85c111..9ebefd986 100644
--- a/ui/app/pages/first-time-flow/welcome/welcome.component.js
+++ b/ui/app/pages/first-time-flow/welcome/welcome.component.js
@@ -1,7 +1,7 @@
-import EventEmitter from 'events'
+// import EventEmitter from 'events'
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
-import Mascot from '../../../components/ui/mascot'
+// import Mascot from '../../../components/ui/mascot'
import Button from '../../../components/ui/button'
import { INITIALIZE_CREATE_PASSWORD_ROUTE, INITIALIZE_SELECT_ACTION_ROUTE } from '../../../helpers/constants/routes'
diff --git a/ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js b/ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js
index de2d9462f..d9546c3ce 100644
--- a/ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js
+++ b/ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js
@@ -108,7 +108,7 @@ export default class SendAssetRow extends Component {
<Identicon diameter={36} />
</div>
<div className="send-v2__asset-dropdown__asset-data">
- <div className="send-v2__asset-dropdown__symbol">ETH</div>
+ <div className="send-v2__asset-dropdown__symbol">TAN</div>
<div className="send-v2__asset-dropdown__name">
<span className="send-v2__asset-dropdown__name__label">{`${t('balance')}:`}</span>
<UserPreferencedCurrencyDisplay