Skip to content

Commit

Permalink
pages/Send: remove deposit warning
Browse files Browse the repository at this point in the history
  • Loading branch information
pro-wh committed Jan 24, 2022
1 parent 932d78c commit 651c700
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
14 changes: 7 additions & 7 deletions src/popup/pages/Send/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 651c700

Please sign in to comment.