From 932d78c99b89b04f43fb2073239f7624958ab207 Mon Sep 17 00:00:00 2001 From: Warren He Date: Mon, 24 Jan 2022 11:07:15 -0800 Subject: [PATCH 1/2] changelog: add withdraw warning --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d788ce8..656316c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ New features: - ParaTime withdrawals now automatically set the fee that will soon be required on Emerald (0.00015 ROSE/TEST) +- Warn users on ParaTime withdraws (and deposits) to accounts they don't own + ([#236](https://github.com/oasisprotocol/oasis-wallet-ext/pull/236)). Little things: From 651c700d71bfed6d75fbb3247d5d6a851266ee58 Mon Sep 17 00:00:00 2001 From: Warren He Date: Mon, 24 Jan 2022 11:07:32 -0800 Subject: [PATCH 2/2] pages/Send: remove deposit warning --- CHANGELOG.md | 2 +- src/i18n/en.json | 1 - src/popup/pages/Send/index.js | 14 +++++++------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 656316c8..17744d24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ New features: - ParaTime withdrawals now automatically set the fee that will soon be required on Emerald (0.00015 ROSE/TEST) -- Warn users on ParaTime withdraws (and deposits) to accounts they don't own +- Warn users on ParaTime withdraws to accounts they don't own ([#236](https://github.com/oasisprotocol/oasis-wallet-ext/pull/236)). Little things: diff --git a/src/i18n/en.json b/src/i18n/en.json index 8771c621..7944c461 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -45,7 +45,6 @@ "confirmTransferringToValidator": "This is a validator wallet address. Transfers to this address do not stake your funds with the validator.", "confirmWantToContinue": "Are you sure you want to continue?", "confirmWithdrawingFromParatimeToForeignAccount": "Destination account is not in your wallet! Some automated systems, e.g., those used for tracking exchange deposits, may be unable to accept funds through ParaTime withdrawals. For better compatibility, cancel, withdraw into your own account, and transfer from there.", - "confirmDepositingToParatimeToForeignAccount": "Destination account is not in your wallet! We recommend you always deposit into your own ParaTime account, then transfer from there.", "confirmDepositingToParatimeToLedgerAccount": "Destination account was imported from Ledger! Ledger accounts do not support withdrawing from ParaTime.", "txHash": "Transaction Hash", "receiveTitle": "Receive", diff --git a/src/popup/pages/Send/index.js b/src/popup/pages/Send/index.js index 1c65d232..454cfc37 100644 --- a/src/popup/pages/Send/index.js +++ b/src/popup/pages/Send/index.js @@ -126,13 +126,13 @@ class SendPage extends React.Component { toAddressPlaceHolder = "0x..." toAddressCanInput = true - warnBeforeSending = async () => { - const ownAddresses = this.state.allAccounts.evmList.map(acc => acc.evmAddress) - if (!ownAddresses.includes(this.state.toAddress)) { - return getLanguage("confirmDepositingToParatimeToForeignAccount", "Destination account is not in your wallet! We recommend you always deposit into your own ParaTime account, then transfer from there.") - } - return undefined - } + // Users may deposit into an Ethereum-compatible address without warning. + // It is still best for compatibility to deposit into the user's own address and to + // transfer from there (entirely within the Emerald side). + // However, it is not necessary to import the Ethereum-compatible account to do the + // deposit, (by private key), so we don't check and warn if they haven't. + // Access the Git blame for this comment to recover the code that would have performed + // this check. }else{ toAddressPlaceHolder = currentAccount.address || "" toAddressCanInput = true