Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pages/Send: remove deposit warning #239

Merged
merged 2 commits into from
Jan 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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.")
pro-wh marked this conversation as resolved.
Show resolved Hide resolved
}
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