Page MenuHomePhabricator

[Cashtab] Copy to clipboard function for OP_RETURN messages
AbandonedPublic

Authored by emack on Jan 17 2022, 11:52.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Summary

As per T2167, a copy to clipboard icon is added next to the OP_RETURN message so users can easily extract the contents.

Dev notes:

  • Borrowed the draft propagation logic from D10826 to minimise rework - will rebase to the final propagation logic in D10826 once that lands first.
  • The buffer string conversion logic in Tx.js' handleCopyMsgToClipboard function will be backed out once D10821 lands where only strings will be returned to the frontend.

Dependencies: D10826, D10821.

Test Plan
  • npm test and navigate to the Wallet screen
  • click on the copy icon next to a normal inbound Cashtab message and ensure the message contents are copied to clipboard and a generic notification is displayed.
  • repeat the above for a normal outbound cashtab message
  • repeat the above for an encrypted inbound cashtab message
  • repeat the above for a normal inbound cashtab message at the 160 char limit
  • repeat the above for a normal inbound cashtab message with special characters
  • repeat the above for a normal inbound Electrum message
  • click on 'Reply To Message' link and ensure no regression from this diff
  • click on anywhere else on the TxWrapper and ensure no regression (i.e. still takes you to the explorer)
  • send a new transaction to the wallet and ensure no regression with Tx History display logic

Diff Detail

Repository
rABC Bitcoin ABC
Branch
copyMsgClipboard
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17925
Build 35673: Build Diffcashtab-tests
Build 35672: arc lint + arc unit

Event Timeline

emack requested review of this revision.Jan 17 2022, 11:52

I think this should be done after T1774 (similar comments on D10826)

Best to replace the current setup of "entire tx is an unableled external link to a block explorer" with something more user friendly. I think best is

  • On tap, tx tile expands
  • One of the expanded option is icon for "external link" which opens the tx in a block explorer
  • Another expanded option is an icon for "copy msg"
This revision now requires changes to proceed.Jan 19 2022, 20:50

This was based on the old UI, to be resubmitted in a fresh diff off the latest master.