diff options
author | Chen Wei <chenwei@byzantine-lab.io> | 2019-07-02 15:04:00 +0800 |
---|---|---|
committer | Chen Wei <chenwei@byzantine-lab.io> | 2019-07-02 15:04:00 +0800 |
commit | ffb58b74793e9b5d5caf36efdc5d7d3867c2e162 (patch) | |
tree | 94e0b86e54e6ba2062a64bb9536a575b9f6c309b /ui | |
parent | 11b14616db1153510b4c37edada7463d2e9a368b (diff) | |
download | tangerine-wallet-browser-ffb58b74793e9b5d5caf36efdc5d7d3867c2e162.tar tangerine-wallet-browser-ffb58b74793e9b5d5caf36efdc5d7d3867c2e162.tar.gz tangerine-wallet-browser-ffb58b74793e9b5d5caf36efdc5d7d3867c2e162.tar.bz2 tangerine-wallet-browser-ffb58b74793e9b5d5caf36efdc5d7d3867c2e162.tar.lz tangerine-wallet-browser-ffb58b74793e9b5d5caf36efdc5d7d3867c2e162.tar.xz tangerine-wallet-browser-ffb58b74793e9b5d5caf36efdc5d7d3867c2e162.tar.zst tangerine-wallet-browser-ffb58b74793e9b5d5caf36efdc5d7d3867c2e162.zip |
configuration, translation updating
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/components/app/dropdowns/network-dropdown.js | 2 | ||||
-rw-r--r-- | ui/app/components/app/token-cell.js | 2 | ||||
-rw-r--r-- | ui/app/helpers/constants/common.js | 2 | ||||
-rw-r--r-- | ui/app/helpers/utils/confirm-tx.util.js | 6 | ||||
-rw-r--r-- | ui/app/helpers/utils/conversions.util.js | 2 | ||||
-rw-r--r-- | ui/app/helpers/utils/transactions.util.js | 2 | ||||
-rw-r--r-- | ui/app/helpers/utils/util.js | 2 | ||||
-rw-r--r-- | ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js | 2 | ||||
-rw-r--r-- | ui/app/pages/settings/advanced-tab/advanced-tab.component.js | 2 | ||||
-rw-r--r-- | ui/app/pages/settings/networks-tab/networks-tab.constants.js | 93 | ||||
-rw-r--r-- | ui/app/pages/unlock-page/unlock-page.component.js | 6 | ||||
-rw-r--r-- | ui/app/selectors/custom-gas.js | 40 | ||||
-rw-r--r-- | ui/app/store/actions.js | 4 | ||||
-rw-r--r-- | ui/lib/account-link.js | 3 | ||||
-rw-r--r-- | ui/lib/etherscan-prefix-for-network.js | 6 |
15 files changed, 96 insertions, 78 deletions
diff --git a/ui/app/components/app/dropdowns/network-dropdown.js b/ui/app/components/app/dropdowns/network-dropdown.js index 8563f0771..78039ce4a 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 || 'ETH' + const ticker = entry.ticker || 'TAN' const nickname = entry.nickname || '' const currentRpcTarget = provider.type === 'rpc' && rpc === provider.rpcTarget diff --git a/ui/app/components/app/token-cell.js b/ui/app/components/app/token-cell.js index 495b9502b..4a632efff 100644 --- a/ui/app/components/app/token-cell.js +++ b/ui/app/components/app/token-cell.js @@ -168,7 +168,7 @@ function navigateTo (url) { function etherscanLinkFor (tokenAddress, address, network) { const prefix = prefixForNetwork(network) - return `https://${prefix}etherscan.io/token/${tokenAddress}?a=${address}` + return `https://${prefix}tangerine.garden/address/${tokenAddress}?a=${address}` } function tokenFactoryFor (tokenAddress) { diff --git a/ui/app/helpers/constants/common.js b/ui/app/helpers/constants/common.js index a0d6e65b3..6641faaae 100644 --- a/ui/app/helpers/constants/common.js +++ b/ui/app/helpers/constants/common.js @@ -1,4 +1,4 @@ -export const ETH = 'ETH' +export const ETH = 'TAN' 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 853427b31..92a1f668e 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 = 'ETH', + fromCurrency = 'TAN', toCurrency, conversionRate, numberOfDecimals, @@ -75,7 +75,7 @@ export function getValueFromWeiHex ({ export function getTransactionFee ({ value, - fromCurrency = 'ETH', + fromCurrency = 'TAN', toCurrency, conversionRate, numberOfDecimals, @@ -101,7 +101,7 @@ export function formatCurrency (value, currencyCode) { export function convertTokenToFiat ({ value, - fromCurrency = 'ETH', + fromCurrency = 'TAN', toCurrency, conversionRate, contractExchangeRate, diff --git a/ui/app/helpers/utils/conversions.util.js b/ui/app/helpers/utils/conversions.util.js index 5e1c21ff7..44e11d996 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: 'ETH', + fromCurrency: 'TAN', toCurrency: convertedCurrency, numberOfDecimals: 2, conversionRate, diff --git a/ui/app/helpers/utils/transactions.util.js b/ui/app/helpers/utils/transactions.util.js index b65bda5b2..e99cc3ac0 100644 --- a/ui/app/helpers/utils/transactions.util.js +++ b/ui/app/helpers/utils/transactions.util.js @@ -225,5 +225,5 @@ export function getBlockExplorerUrlForTx (networkId, hash, rpcPrefs = {}) { return `${rpcPrefs.blockExplorerUrl}/tx/${hash}` } const prefix = prefixForNetwork(networkId) - return `https://${prefix}etherscan.io/tx/${hash}` + return `https://${prefix}tangerine.garden/transaction/${hash}` } diff --git a/ui/app/helpers/utils/util.js b/ui/app/helpers/utils/util.js index 94fa9ad42..5f9856965 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 = 'ETH') { +function formatBalance (balance, decimalsToKeep, needsParse = true, ticker = 'TAN') { 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 de2d9462f..0716d1c22 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' : 'ETH', + assetSelected: address ? 'ERC20' : 'TAN', }, }) 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 3d27fe349..7b2afa9f4 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 = 'ETH', nickname) { + validateRpc (newRpc, chainId, ticker = 'TAN', 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 1a49ca04f..6bcf5c802 100644 --- a/ui/app/pages/settings/networks-tab/networks-tab.constants.js +++ b/ui/app/pages/settings/networks-tab/networks-tab.constants.js @@ -1,48 +1,57 @@ const defaultNetworksData = [ + // { + // labelKey: 'mainnet', + // iconColor: '#29B6AF', + // providerType: 'mainnet', + // rpcUrl: 'https://api.infura.io/v1/jsonrpc/mainnet', + // chainId: '1', + // ticker: 'ETH', + // blockExplorerUrl: 'https://etherscan.io', + // }, + // { + // labelKey: 'ropsten', + // iconColor: '#FF4A8D', + // providerType: 'ropsten', + // rpcUrl: 'https://api.infura.io/v1/jsonrpc/ropsten', + // chainId: '3', + // ticker: 'ETH', + // blockExplorerUrl: 'https://ropsten.etherscan.io', + // }, + // { + // labelKey: 'kovan', + // iconColor: '#9064FF', + // providerType: 'kovan', + // rpcUrl: 'https://api.infura.io/v1/jsonrpc/kovan', + // chainId: '4', + // ticker: 'ETH', + // blockExplorerUrl: 'https://etherscan.io', + // }, + // { + // labelKey: 'rinkeby', + // iconColor: '#F6C343', + // providerType: 'rinkeby', + // rpcUrl: 'https://api.infura.io/v1/jsonrpc/rinkeby', + // chainId: '42', + // ticker: 'ETH', + // blockExplorerUrl: 'https://rinkeby.etherscan.io', + // }, + // { + // labelKey: 'goerli', + // iconColor: '#3099f2', + // providerType: 'goerli', + // rpcUrl: 'https://api.infura.io/v1/jsonrpc/goerli', + // chainId: '5', + // ticker: 'ETH', + // blockExplorerUrl: 'https://goerli.etherscan.io', + // }, { - labelKey: 'mainnet', - iconColor: '#29B6AF', - providerType: 'mainnet', - rpcUrl: 'https://api.infura.io/v1/jsonrpc/mainnet', - chainId: '1', - ticker: 'ETH', - blockExplorerUrl: 'https://etherscan.io', - }, - { - labelKey: 'ropsten', + labelKey: 'tangerine_testnet', iconColor: '#FF4A8D', - providerType: 'ropsten', - rpcUrl: 'https://api.infura.io/v1/jsonrpc/ropsten', - chainId: '3', - ticker: 'ETH', - blockExplorerUrl: 'https://ropsten.etherscan.io', - }, - { - labelKey: 'kovan', - iconColor: '#9064FF', - providerType: 'kovan', - rpcUrl: 'https://api.infura.io/v1/jsonrpc/kovan', - chainId: '4', - ticker: 'ETH', - blockExplorerUrl: 'https://etherscan.io', - }, - { - labelKey: 'rinkeby', - iconColor: '#F6C343', - providerType: 'rinkeby', - rpcUrl: 'https://api.infura.io/v1/jsonrpc/rinkeby', - chainId: '42', - ticker: 'ETH', - blockExplorerUrl: 'https://rinkeby.etherscan.io', - }, - { - labelKey: 'goerli', - iconColor: '#3099f2', - providerType: 'goerli', - rpcUrl: 'https://api.infura.io/v1/jsonrpc/goerli', - chainId: '5', - ticker: 'ETH', - blockExplorerUrl: 'https://goerli.etherscan.io', + providerType: 'tangerine_testnet', + rpcUrl: 'https://testnet-rpc.tangerine-network.io', + chainId: '374', + ticker: 'TAN', + blockExplorerUrl: 'https://testnet.tangerine.garden', }, { labelKey: 'localhost', diff --git a/ui/app/pages/unlock-page/unlock-page.component.js b/ui/app/pages/unlock-page/unlock-page.component.js index 4d0d5d782..36b46e548 100644 --- a/ui/app/pages/unlock-page/unlock-page.component.js +++ b/ui/app/pages/unlock-page/unlock-page.component.js @@ -152,14 +152,14 @@ export default class UnlockPage extends Component { <img style={{ height: '50px', - marginBottom: '40px', + marginBottom: '30px', }} src={'images/logo/metamask-logo-horizontal.svg'} /> </div> - <h1 className="unlock-page__title"> + {/* <h1 className="unlock-page__title"> { t('welcomeBack') } - </h1> + </h1> */} <div>{ t('unlockMessage') }</div> <form className="unlock-page__form" diff --git a/ui/app/selectors/custom-gas.js b/ui/app/selectors/custom-gas.js index 1f7ee8f9f..a1df738f6 100644 --- a/ui/app/selectors/custom-gas.js +++ b/ui/app/selectors/custom-gas.js @@ -238,10 +238,10 @@ function getRenderableBasicEstimateData (state, gasLimit) { const { gas: { basicEstimates: { - safeLow, + // safeLow, fast, fastest, - safeLowWait, + // safeLowWait, fastestWait, fastWait, }, @@ -249,15 +249,15 @@ function getRenderableBasicEstimateData (state, gasLimit) { } = state return [ - { - labelKey: 'slow', - feeInPrimaryCurrency: getRenderableEthFee(safeLow, gasLimit), - feeInSecondaryCurrency: showFiat - ? getRenderableConvertedCurrencyFee(safeLow, gasLimit, currentCurrency, conversionRate) - : '', - timeEstimate: safeLowWait && getRenderableTimeEstimate(safeLowWait), - priceInHexWei: getGasPriceInHexWei(safeLow), - }, + // { + // labelKey: 'slow', + // feeInPrimaryCurrency: getRenderableEthFee(safeLow, gasLimit), + // feeInSecondaryCurrency: showFiat + // ? getRenderableConvertedCurrencyFee(safeLow, gasLimit, currentCurrency, conversionRate) + // : '', + // timeEstimate: safeLowWait && getRenderableTimeEstimate(safeLowWait), + // priceInHexWei: getGasPriceInHexWei(safeLow), + // }, { labelKey: 'average', feeInPrimaryCurrency: getRenderableEthFee(fast, gasLimit), @@ -293,7 +293,7 @@ function getRenderableEstimateDataForSmallButtonsFromGWEI (state) { const { gas: { basicEstimates: { - safeLow, + // safeLow, fast, fastest, }, @@ -301,14 +301,14 @@ function getRenderableEstimateDataForSmallButtonsFromGWEI (state) { } = state return [ - { - labelKey: 'slow', - feeInSecondaryCurrency: showFiat - ? getRenderableConvertedCurrencyFee(safeLow, gasLimit, currentCurrency, conversionRate) - : '', - feeInPrimaryCurrency: getRenderableEthFee(safeLow, gasLimit, NUMBER_OF_DECIMALS_SM_BTNS, true), - priceInHexWei: getGasPriceInHexWei(safeLow, true), - }, + // { + // labelKey: 'slow', + // feeInSecondaryCurrency: showFiat + // ? getRenderableConvertedCurrencyFee(safeLow, gasLimit, currentCurrency, conversionRate) + // : '', + // feeInPrimaryCurrency: getRenderableEthFee(safeLow, gasLimit, NUMBER_OF_DECIMALS_SM_BTNS, true), + // priceInHexWei: getGasPriceInHexWei(safeLow, true), + // }, { labelKey: 'average', feeInSecondaryCurrency: showFiat diff --git a/ui/app/store/actions.js b/ui/app/store/actions.js index d3cc7efca..fd7423cf1 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 = 'ETH', nickname, rpcPrefs) { +function updateAndSetCustomRpc (newRpc, chainId, ticker = 'TAN', 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 = 'ETH', nickname, rpcPr } } -function editRpc (oldRpc, newRpc, chainId, ticker = 'ETH', nickname, rpcPrefs) { +function editRpc (oldRpc, newRpc, chainId, ticker = 'TAN', nickname, rpcPrefs) { return (dispatch) => { log.debug(`background.delRpcTarget: ${oldRpc}`) background.delCustomRpc(oldRpc, (err) => { diff --git a/ui/lib/account-link.js b/ui/lib/account-link.js index f2e321991..1760b9f76 100644 --- a/ui/lib/account-link.js +++ b/ui/lib/account-link.js @@ -24,6 +24,9 @@ module.exports = function (address, network, rpcPrefs) { case 5: // goerli test net link = `https://goerli.etherscan.io/address/${address}` break + case 374: + link = `https://testnet.tangerine.garden/address/${address}` + break default: link = '' break diff --git a/ui/lib/etherscan-prefix-for-network.js b/ui/lib/etherscan-prefix-for-network.js index ce194b0a8..aec4a2d33 100644 --- a/ui/lib/etherscan-prefix-for-network.js +++ b/ui/lib/etherscan-prefix-for-network.js @@ -17,6 +17,12 @@ module.exports = function (network) { case 5: // goerli test net prefix = 'goerli.' break + case 373: + prefix = '' + break + case 374: + prefix = 'testnet.' + break default: prefix = '' } |