edge / wallet

The web wallet of the XE Blockchain.

Home Page:https://wallet.xe.network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update clipboard checks

annybs opened this issue · comments

commented

As highlighted by @feroviktor:

copyToClipboard(input) {
if (!this.canCopy) window.alert('Clipboard unavailable. Please copy-paste manually.')
return navigator.clipboard.writeText(input)
},

The canCopy component data isn't necessary here as navigator.clipboard is globally accessible. This should be updated in all instances similarly to edge/explorer#139:

  1. Remove canCopy data from component
  2. Substitute !!navigator.clipboard as conditional
  3. Ensure navigator.clipboard is only accessed when available
commented

@feroviktor Please take note of my latest feedback on the use of navigator.clipboard - specifically, write it this way:

if (!!navigator.clipboard) {
  return navigator.clipboard.writeText(input)
}
window.alert('Clipboard unavailable. Please copy-paste manually.')
commented

Closed prematurely - I need to review the PR first!

commented

Merged to develop.