aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorChen Wei <chenwei@byzantine-lab.io>2019-07-02 15:44:40 +0800
committerChen Wei <chenwei@byzantine-lab.io>2019-07-02 15:44:40 +0800
commit852df543036aac5d0d24d3a31a24818ac4c114bd (patch)
treed8758b40eea4ea8bd35aaa2e7255621fffdd702b /ui
parentffb58b74793e9b5d5caf36efdc5d7d3867c2e162 (diff)
downloadtangerine-wallet-browser-852df543036aac5d0d24d3a31a24818ac4c114bd.tar
tangerine-wallet-browser-852df543036aac5d0d24d3a31a24818ac4c114bd.tar.gz
tangerine-wallet-browser-852df543036aac5d0d24d3a31a24818ac4c114bd.tar.bz2
tangerine-wallet-browser-852df543036aac5d0d24d3a31a24818ac4c114bd.tar.lz
tangerine-wallet-browser-852df543036aac5d0d24d3a31a24818ac4c114bd.tar.xz
tangerine-wallet-browser-852df543036aac5d0d24d3a31a24818ac4c114bd.tar.zst
tangerine-wallet-browser-852df543036aac5d0d24d3a31a24818ac4c114bd.zip
revert replacing "ETH" with "TAN"
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/app/dropdowns/network-dropdown.js2
-rw-r--r--ui/app/components/app/modals/deposit-ether-modal.js94
-rw-r--r--ui/app/css/itcss/components/account-details-dropdown.scss2
-rw-r--r--ui/app/ducks/gas/gas.duck.js14
-rw-r--r--ui/app/helpers/constants/common.js2
-rw-r--r--ui/app/helpers/utils/confirm-tx.util.js6
-rw-r--r--ui/app/helpers/utils/conversions.util.js2
-rw-r--r--ui/app/helpers/utils/util.js2
-rw-r--r--ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js2
-rw-r--r--ui/app/pages/settings/advanced-tab/advanced-tab.component.js2
-rw-r--r--ui/app/pages/settings/networks-tab/networks-tab.constants.js2
-rw-r--r--ui/app/store/actions.js4
12 files changed, 60 insertions, 74 deletions
diff --git a/ui/app/components/app/dropdowns/network-dropdown.js b/ui/app/components/app/dropdowns/network-dropdown.js
index 78039ce4a..8563f0771 100644
--- a/ui/app/components/app/dropdowns/network-dropdown.js
+++ b/ui/app/components/app/dropdowns/network-dropdown.js
@@ -334,7 +334,7 @@ NetworkDropdown.prototype.renderCommonRpc = function (rpcListDetail, provider) {
return reversedRpcListDetail.map((entry) => {
const rpc = entry.rpcUrl
- const ticker = entry.ticker || 'TAN'
+ const ticker = entry.ticker || 'ETH'
const nickname = entry.nickname || ''
const currentRpcTarget = provider.type === 'rpc' && rpc === provider.rpcTarget
diff --git a/ui/app/components/app/modals/deposit-ether-modal.js b/ui/app/components/app/modals/deposit-ether-modal.js
index f56069d65..b95b9aa5f 100644
--- a/ui/app/components/app/modals/deposit-ether-modal.js
+++ b/ui/app/components/app/modals/deposit-ether-modal.js
@@ -180,53 +180,53 @@ DepositEtherModal.prototype.render = function () {
hide: !isTestNetwork || buyingWithShapeshift,
}),
- this.renderRow({
- logo: h('div.deposit-ether-modal__logo', {
- style: {
- backgroundImage: 'url(\'./images/wyre.svg\')',
- height: '40px',
- },
- }),
- title: WYRE_ROW_TITLE,
- text: WYRE_ROW_TEXT,
- buttonLabel: this.context.t('continueToWyre'),
- onButtonClick: () => toWyre(address),
- hide: isTestNetwork || buyingWithShapeshift,
- }),
-
- this.renderRow({
- logo: h('div.deposit-ether-modal__logo', {
- style: {
- backgroundImage: 'url(\'./images/coinswitch_logo.png\')',
- height: '40px',
- },
- }),
- title: COINSWITCH_ROW_TITLE,
- text: COINSWITCH_ROW_TEXT,
- buttonLabel: this.context.t('continueToCoinSwitch'),
- onButtonClick: () => toCoinSwitch(address),
- hide: isTestNetwork || buyingWithShapeshift,
- }),
-
- this.renderRow({
- logo: h('div.deposit-ether-modal__logo', {
- style: {
- backgroundImage: 'url(\'./images/shapeshift logo.png\')',
- },
- }),
- title: SHAPESHIFT_ROW_TITLE,
- text: SHAPESHIFT_ROW_TEXT,
- buttonLabel: this.context.t('shapeshiftBuy'),
- onButtonClick: () => this.setState({ buyingWithShapeshift: true }),
- hide: isTestNetwork,
- hideButton: buyingWithShapeshift,
- hideTitle: buyingWithShapeshift,
- onBackClick: () => this.setState({ buyingWithShapeshift: false }),
- showBackButton: this.state.buyingWithShapeshift,
- className: buyingWithShapeshift && 'deposit-ether-modal__buy-row__shapeshift-buy',
- }),
-
- buyingWithShapeshift && h(ShapeshiftForm),
+ // this.renderRow({
+ // logo: h('div.deposit-ether-modal__logo', {
+ // style: {
+ // backgroundImage: 'url(\'./images/wyre.svg\')',
+ // height: '40px',
+ // },
+ // }),
+ // title: WYRE_ROW_TITLE,
+ // text: WYRE_ROW_TEXT,
+ // buttonLabel: this.context.t('continueToWyre'),
+ // onButtonClick: () => toWyre(address),
+ // hide: isTestNetwork || buyingWithShapeshift,
+ // }),
+
+ // this.renderRow({
+ // logo: h('div.deposit-ether-modal__logo', {
+ // style: {
+ // backgroundImage: 'url(\'./images/coinswitch_logo.png\')',
+ // height: '40px',
+ // },
+ // }),
+ // title: COINSWITCH_ROW_TITLE,
+ // text: COINSWITCH_ROW_TEXT,
+ // buttonLabel: this.context.t('continueToCoinSwitch'),
+ // onButtonClick: () => toCoinSwitch(address),
+ // hide: isTestNetwork || buyingWithShapeshift,
+ // }),
+
+ // this.renderRow({
+ // logo: h('div.deposit-ether-modal__logo', {
+ // style: {
+ // backgroundImage: 'url(\'./images/shapeshift logo.png\')',
+ // },
+ // }),
+ // title: SHAPESHIFT_ROW_TITLE,
+ // text: SHAPESHIFT_ROW_TEXT,
+ // buttonLabel: this.context.t('shapeshiftBuy'),
+ // onButtonClick: () => this.setState({ buyingWithShapeshift: true }),
+ // hide: isTestNetwork,
+ // hideButton: buyingWithShapeshift,
+ // hideTitle: buyingWithShapeshift,
+ // onBackClick: () => this.setState({ buyingWithShapeshift: false }),
+ // showBackButton: this.state.buyingWithShapeshift,
+ // className: buyingWithShapeshift && 'deposit-ether-modal__buy-row__shapeshift-buy',
+ // }),
+
+ // buyingWithShapeshift && h(ShapeshiftForm),
]),
diff --git a/ui/app/css/itcss/components/account-details-dropdown.scss b/ui/app/css/itcss/components/account-details-dropdown.scss
index 2a3007f83..94fdcf89f 100644
--- a/ui/app/css/itcss/components/account-details-dropdown.scss
+++ b/ui/app/css/itcss/components/account-details-dropdown.scss
@@ -1,5 +1,5 @@
.account-details-dropdown {
- width: 60%;
+ width: 80%;
position: absolute;
top: 120px;
right: 15px;
diff --git a/ui/app/ducks/gas/gas.duck.js b/ui/app/ducks/gas/gas.duck.js
index d0f09ce0d..911d0ece8 100644
--- a/ui/app/ducks/gas/gas.duck.js
+++ b/ui/app/ducks/gas/gas.duck.js
@@ -226,8 +226,6 @@ export function fetchBasicGasEstimates () {
fastest: gasEstimate * 2,
}
- console.log('!!!BASIC GAS ESTIMATE', basicEstimates)
-
const timeRetrieved = Date.now()
dispatch(setBasicPriceEstimatesLastRetrieved(timeRetrieved))
saveLocalStorageData(timeRetrieved, 'BASIC_PRICE_ESTIMATES_LAST_RETRIEVED')
@@ -258,18 +256,6 @@ export function fetchBasicGasAndTimeEstimates () {
dispatch(basicGasEstimatesLoadingStarted())
- 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((res) => {
- console.log('RES FROM TANGERINE RPC!!!!!', res)
- })
-
const promiseToFetch = Date.now() - timeLastRetrieved > 75000
? fetch('https://testnet-rpc.tangerine-network.io', {
'headers': {
diff --git a/ui/app/helpers/constants/common.js b/ui/app/helpers/constants/common.js
index 6641faaae..a0d6e65b3 100644
--- a/ui/app/helpers/constants/common.js
+++ b/ui/app/helpers/constants/common.js
@@ -1,4 +1,4 @@
-export const ETH = 'TAN'
+export const ETH = 'ETH'
export const GWEI = 'GWEI'
export const WEI = 'WEI'
diff --git a/ui/app/helpers/utils/confirm-tx.util.js b/ui/app/helpers/utils/confirm-tx.util.js
index 92a1f668e..853427b31 100644
--- a/ui/app/helpers/utils/confirm-tx.util.js
+++ b/ui/app/helpers/utils/confirm-tx.util.js
@@ -55,7 +55,7 @@ export function addFiat (...args) {
export function getValueFromWeiHex ({
value,
- fromCurrency = 'TAN',
+ fromCurrency = 'ETH',
toCurrency,
conversionRate,
numberOfDecimals,
@@ -75,7 +75,7 @@ export function getValueFromWeiHex ({
export function getTransactionFee ({
value,
- fromCurrency = 'TAN',
+ fromCurrency = 'ETH',
toCurrency,
conversionRate,
numberOfDecimals,
@@ -101,7 +101,7 @@ export function formatCurrency (value, currencyCode) {
export function convertTokenToFiat ({
value,
- fromCurrency = 'TAN',
+ fromCurrency = 'ETH',
toCurrency,
conversionRate,
contractExchangeRate,
diff --git a/ui/app/helpers/utils/conversions.util.js b/ui/app/helpers/utils/conversions.util.js
index 44e11d996..5e1c21ff7 100644
--- a/ui/app/helpers/utils/conversions.util.js
+++ b/ui/app/helpers/utils/conversions.util.js
@@ -105,7 +105,7 @@ export function decEthToConvertedCurrency (ethTotal, convertedCurrency, conversi
return conversionUtil(ethTotal, {
fromNumericBase: 'dec',
toNumericBase: 'dec',
- fromCurrency: 'TAN',
+ fromCurrency: 'ETH',
toCurrency: convertedCurrency,
numberOfDecimals: 2,
conversionRate,
diff --git a/ui/app/helpers/utils/util.js b/ui/app/helpers/utils/util.js
index 5f9856965..94fa9ad42 100644
--- a/ui/app/helpers/utils/util.js
+++ b/ui/app/helpers/utils/util.js
@@ -137,7 +137,7 @@ function parseBalance (balance) {
// Takes wei hex, returns an object with three properties.
// Its "formatted" property is what we generally use to render values.
-function formatBalance (balance, decimalsToKeep, needsParse = true, ticker = 'TAN') {
+function formatBalance (balance, decimalsToKeep, needsParse = true, ticker = 'ETH') {
var parsed = needsParse ? parseBalance(balance) : balance.split('.')
var beforeDecimal = parsed[0]
var afterDecimal = parsed[1]
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 0716d1c22..de2d9462f 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
@@ -45,7 +45,7 @@ export default class SendAssetRow extends Component {
name: 'User clicks "Assets" dropdown',
},
customVariables: {
- assetSelected: address ? 'ERC20' : 'TAN',
+ assetSelected: address ? 'ERC20' : 'ETH',
},
})
this.props.setSelectedToken(address)
diff --git a/ui/app/pages/settings/advanced-tab/advanced-tab.component.js b/ui/app/pages/settings/advanced-tab/advanced-tab.component.js
index 7b2afa9f4..3d27fe349 100644
--- a/ui/app/pages/settings/advanced-tab/advanced-tab.component.js
+++ b/ui/app/pages/settings/advanced-tab/advanced-tab.component.js
@@ -138,7 +138,7 @@ export default class AdvancedTab extends PureComponent {
)
}
- validateRpc (newRpc, chainId, ticker = 'TAN', nickname) {
+ validateRpc (newRpc, chainId, ticker = 'ETH', nickname) {
const { setRpcTarget, displayWarning } = this.props
if (validUrl.isWebUri(newRpc)) {
this.context.metricsEvent({
diff --git a/ui/app/pages/settings/networks-tab/networks-tab.constants.js b/ui/app/pages/settings/networks-tab/networks-tab.constants.js
index 6bcf5c802..39e864d16 100644
--- a/ui/app/pages/settings/networks-tab/networks-tab.constants.js
+++ b/ui/app/pages/settings/networks-tab/networks-tab.constants.js
@@ -50,7 +50,7 @@ const defaultNetworksData = [
providerType: 'tangerine_testnet',
rpcUrl: 'https://testnet-rpc.tangerine-network.io',
chainId: '374',
- ticker: 'TAN',
+ ticker: 'ETH',
blockExplorerUrl: 'https://testnet.tangerine.garden',
},
{
diff --git a/ui/app/store/actions.js b/ui/app/store/actions.js
index fd7423cf1..d3cc7efca 100644
--- a/ui/app/store/actions.js
+++ b/ui/app/store/actions.js
@@ -1982,7 +1982,7 @@ function setPreviousProvider (type) {
}
}
-function updateAndSetCustomRpc (newRpc, chainId, ticker = 'TAN', nickname, rpcPrefs) {
+function updateAndSetCustomRpc (newRpc, chainId, ticker = 'ETH', nickname, rpcPrefs) {
return (dispatch) => {
log.debug(`background.updateAndSetCustomRpc: ${newRpc} ${chainId} ${ticker} ${nickname}`)
background.updateAndSetCustomRpc(newRpc, chainId, ticker, nickname || newRpc, rpcPrefs, (err) => {
@@ -1998,7 +1998,7 @@ function updateAndSetCustomRpc (newRpc, chainId, ticker = 'TAN', nickname, rpcPr
}
}
-function editRpc (oldRpc, newRpc, chainId, ticker = 'TAN', nickname, rpcPrefs) {
+function editRpc (oldRpc, newRpc, chainId, ticker = 'ETH', nickname, rpcPrefs) {
return (dispatch) => {
log.debug(`background.delRpcTarget: ${oldRpc}`)
background.delCustomRpc(oldRpc, (err) => {