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 3e062a8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 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
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 3e062a8

Please sign in to comment.