diff --git a/common/components/AddressBookTableRow.tsx b/common/components/AddressBookTableRow.tsx index 2804e1d6..497390e1 100644 --- a/common/components/AddressBookTableRow.tsx +++ b/common/components/AddressBookTableRow.tsx @@ -77,7 +77,9 @@ class AddressBookTableRow extends React.Component { { dropdownThreshold } = this.props; const inputClassName = `AddressInput-input ${label ? 'AddressInput-input-with-label' : ''}`; - const sendingTo = `${translateRaw('SENDING_TO')} ${label}`; + const sendingTo = label + ? translateRaw('SENDING_TO', { + $label: label + }) + : ''; const isENSAddress = currentTo.raw.includes('.eth'); /** diff --git a/common/components/ConfirmationModal/components/Body/components/Details.tsx b/common/components/ConfirmationModal/components/Body/components/Details.tsx index d83b3c16..bfa4ce06 100644 --- a/common/components/ConfirmationModal/components/Body/components/Details.tsx +++ b/common/components/ConfirmationModal/components/Body/components/Details.tsx @@ -25,9 +25,9 @@ class DetailsClass extends Component { isValid={true} showValidAsPlain={true} readOnly={true} - value={`${network} ${translateRaw('NETWORK_2')} - ${translateRaw( - 'PROVIDED_BY' - )} ${service}`} + value={`${translateRaw('NETWORK_2', { + $network: network + })} - ${translateRaw('PROVIDED_BY', { $service: service })}`} /> diff --git a/common/components/ConfirmationModal/components/Body/components/Node.tsx b/common/components/ConfirmationModal/components/Body/components/Node.tsx index 2dfe85e7..fc3231e8 100644 --- a/common/components/ConfirmationModal/components/Body/components/Node.tsx +++ b/common/components/ConfirmationModal/components/Body/components/Node.tsx @@ -14,8 +14,10 @@ class NodeClass extends Component { public render() { return (
  • - {translate('YOU_ARE_INTERACTING')} {this.props.node.network} - {translate('NETWORK')} {translate('PROVIDED_BY')} {this.props.node.service} + {translate('YOU_ARE_INTERACTING', { + $network: this.props.node.network + })} + {translate('PROVIDED_BY', { $service: this.props.node.service })}
  • ); } diff --git a/common/components/WalletDecrypt/WalletDecrypt.tsx b/common/components/WalletDecrypt/WalletDecrypt.tsx index 7e759f87..de5a0aba 100644 --- a/common/components/WalletDecrypt/WalletDecrypt.tsx +++ b/common/components/WalletDecrypt/WalletDecrypt.tsx @@ -268,8 +268,10 @@ const WalletDecrypt = withRouter( {translate('CHANGE_WALLET')}

    - {!selectedWallet.isReadOnly && translate('UNLOCK_WALLET')}{' '} - {translate(selectedWallet.lid)} + {!selectedWallet.isReadOnly && + translate('UNLOCK_WALLET', { + $wallet: translateRaw(selectedWallet.lid) + })}

    ( key={walletType} name={translateRaw(wallet.lid)} description={translateRaw(wallet.description)} + icon={wallet.icon} helpLink={wallet.helpLink} walletType={walletType} isSecure={true} diff --git a/common/config/dpaths.ts b/common/config/dpaths.ts index 544b0c4a..bc9c7e12 100644 --- a/common/config/dpaths.ts +++ b/common/config/dpaths.ts @@ -113,6 +113,11 @@ export const ESN_DEFAULT: DPath = { value: "m/44'/31102'/0'/0" }; +export const AQUA_DEFAULT: DPath = { + label: 'Default (AQUA)', + value: "m/44'/60'/0'/0" +}; + export const DPaths: DPath[] = [ ETH_DEFAULT, ETH_TREZOR, @@ -135,7 +140,8 @@ export const DPaths: DPath[] = [ RSK_TESTNET, GO_DEFAULT, EOSC_DEFAULT, - ESN_DEFAULT + ESN_DEFAULT, + AQUA_DEFAULT ]; // PATHS TO BE INCLUDED REGARDLESS OF WALLET FORMAT diff --git a/common/features/config/__snapshots__/sagas.spec.ts.snap b/common/features/config/__snapshots__/sagas.spec.ts.snap index 5c78d960..310bb58e 100644 --- a/common/features/config/__snapshots__/sagas.spec.ts.snap +++ b/common/features/config/__snapshots__/sagas.spec.ts.snap @@ -5,7 +5,7 @@ Object { "@@redux-saga/IO": true, "SELECT": Object { "args": Array [ - "ESN", + "AQUA", ], "selector": [Function], }, diff --git a/common/features/config/networks/static/reducer.ts b/common/features/config/networks/static/reducer.ts index e6dc2094..843b3241 100644 --- a/common/features/config/networks/static/reducer.ts +++ b/common/features/config/networks/static/reducer.ts @@ -27,7 +27,8 @@ import { RSK_TESTNET, GO_DEFAULT, EOSC_DEFAULT, - ESN_DEFAULT + ESN_DEFAULT, + AQUA_DEFAULT } from 'config/dpaths'; import { makeExplorer } from 'utils/helpers'; import { StaticNetworksState } from './types'; @@ -542,6 +543,30 @@ export const STATIC_NETWORKS_INITIAL_STATE: StaticNetworksState = { max: 60, initial: 20 } + }, + AQUA: { + id: 'AQUA', + name: 'Aquachain', + unit: 'AQUA', + chainId: 61717561, + isCustom: false, + color: '#00ffff', + blockExplorer: makeExplorer({ + name: 'AQUA Explorer', + origin: 'https://aquachain.github.io/explorer/#' + }), + tokens: [], + contracts: [], + dPathFormats: { + [SecureWalletName.TREZOR]: AQUA_DEFAULT, + [SecureWalletName.LEDGER_NANO_S]: AQUA_DEFAULT, + [InsecureWalletName.MNEMONIC_PHRASE]: AQUA_DEFAULT + }, + gasPriceSettings: { + min: 0.1, + max: 10, + initial: 0.1 + } } }; diff --git a/common/libs/nodes/configs.ts b/common/libs/nodes/configs.ts index 534efc54..b1a0f205 100644 --- a/common/libs/nodes/configs.ts +++ b/common/libs/nodes/configs.ts @@ -226,6 +226,21 @@ export const NODE_CONFIGS: { [key in StaticNetworkIds]: RawNodeConfig[] } = { service: 'ethersocial.org', url: 'https://api.esn.gonspool.com' } + ], + + AQUA: [ + { + name: makeNodeName('AQUA', 'aquachain'), + type: 'rpc', + service: 'aquacha.in', + url: 'https://tx.aquacha.in/api' + }, + { + name: makeNodeName('AQUA', 'uncan.onical'), + type: 'rpc', + service: 'uncan.onical.org', + url: 'https://c.onical.org' + } ] }; diff --git a/common/translations/lang/en.json b/common/translations/lang/en.json index d4795928..3df93439 100644 --- a/common/translations/lang/en.json +++ b/common/translations/lang/en.json @@ -10,7 +10,7 @@ "NO_LABEL_FOUND_CONTAINING": "No labels found containing", "LABEL_CANNOT_BEGIN_WITH_0X": "Address labels may not begin with 0x.", "LABEL_CANNOT_CONTAIN_ENS_SUFFIX": "Address labels may not contain \".eth\", \".test\" or \".reverse\".", - "SENDING_TO": "Sending to", + "SENDING_TO": "Sending to $label", "NEW_ADDRESS": "New address", "NEW_LABEL": "New label", "X_TXHASH": "TX Hash", @@ -81,10 +81,10 @@ "ORDER_TREZOR": "Don’t have a TREZOR? Order one now!", "HOWTO_TREZOR": "How to use TREZOR with MyCrypto", "X_KEEPKEY": "KeepKey", + "UNLOCK_WALLET": "Unlock your $wallet", "X_SAFE_T": "Safe-T mini ", "ADD_SAFE_T_SCAN": "Connect to Safe-T mini ", "ORDER_SAFE_T": "Don’t have a Safe-T mini? Order one now!", - "UNLOCK_WALLET": "Unlock your", "X_PARITYSIGNER": "Parity Signer ", "ADD_PARITY_DESC": "Connect & sign via your Parity Signer mobile app ", "ADD_PARITY_1": "Transaction canceled ", @@ -111,20 +111,8 @@ "MYWAL_NICK": "Wallet Nickname ", "MYWAL_ADDRESS": "Wallet Address ", "EDIT_LABEL": "edit label", - "EDIT_LABEL_FOR": "Edit label for", + "EDIT_LABEL_FOR": "Edit label for $address", "SAVE_LABEL": "save label", - "MYWAL_BAL": "Balance ", - "MYWAL_EDIT": "Edit ", - "MYWAL_VIEW": "View ", - "MYWAL_REMOVE": "Remove ", - "MYWAL_REMOVEWAL": "Remove Wallet ", - "MYWAL_WATCHONLY": "Your Watch-Only Accounts ", - "MYWAL_VIEWING": "Viewing Wallet ", - "MYWAL_HIDE": "Hide Wallet Info ", - "MYWAL_EDIT_2": "Edit Wallet ", - "MYWAL_NAME": "Wallet Name ", - "MYWAL_CONTENT_1": "Warning! You are about to remove your wallet ", - "MYWAL_CONTENT_3": "If you want to use this wallet with your MyCrypto CX in the future, you will need to manually re-add it using the private key/JSON and password. ", "GEN_DESC": "If you want to generate multiple wallets, you can do so here ", "GEN_LABEL_1": "Enter a password", "GEN_PLACEHOLDER_1": "Do NOT forget to save this! ", @@ -173,11 +161,6 @@ "SEND_SIGNED": "Signed Transaction ", "SEND_TRANS": "Send Transaction ", "SEND_TO": "Send to ", - "SENDMODAL_TITLE": "Warning! ", - "SENDMODAL_CONTENT_1": "You are about to send ", - "SENDMODAL_CONTENT_2": "to address ", - "SENDMODAL_CONTENT_3": "Are you sure you want to do this? ", - "SENDMODAL_CONTENT_4": "NOTE: If you encounter an error, you most likely need to add ether to your account to cover the gas cost of sending tokens. Gas is paid in ether. ", "TOKEN_ADDR": "Address ", "TOKEN_SYMBOL": "Token Symbol ", "TOKEN_DEC": "Decimals ", @@ -228,11 +211,8 @@ "NODE_CTA": "Save & Use Custom Node", "NODE_ADD": "Add Custom Node", "SWAP_RATES": "Current Rates ", - "SWAP_INIT_1": "I want to swap my ", - "SWAP_INIT_2": " for ", "SWAP_INIT_CTA": "Let's do this! ", "SWAP_INFORMATION": "Your Information ", - "SWAP_SEND_AMT": "Amount to send ", "SWAP_REC_AMT": "Amount to receive ", "SWAP_YOUR_RATE": "Your rate ", "SWAP_REC_ADD": "Your Receiving Address ", @@ -659,11 +639,10 @@ "COPIED": "copied!", "COPY_ADDRESS": "copy address", "EDIT_LABEL_2": "Edit label", - "CONFIRM_ADDRESS_ON": "Confirm address on", "NETWORK": "Network", - "NETWORK_2": "network", - "PROVIDED_BY": "provided by", - "YOU_ARE_INTERACTING": "You are interacting with the", + "NETWORK_2": "$network network", + "PROVIDED_BY": "Network provided by $service", + "YOU_ARE_INTERACTING": "You are interacting with the $network network.", "USING_PAYMENT_ID": "Using the required Payment ID of:", "PAYMENT_ID_WARNING": "Don't forget to send your XMR with the payment ID [[?]](https://getmonero.org/resources/moneropedia/paymentid.html) above, or you WILL lose your funds.", "WHAT_IS_PAYMENT_ID": "what's a payment ID?", diff --git a/shared/types/network.d.ts b/shared/types/network.d.ts index 5102cc54..ec43ede6 100644 --- a/shared/types/network.d.ts +++ b/shared/types/network.d.ts @@ -20,7 +20,8 @@ type StaticNetworkIds = | 'GO' | 'GO_TESTNET' | 'EOSC' - | 'ESN'; + | 'ESN' + | 'AQUA'; export interface BlockExplorerConfig { name: string;