Page MenuHomePhabricator

[Cashtab] Convert OP_RETURN input into TextArea
ClosedPublic

Authored by emack on Nov 19 2021, 04:37.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Commits
rABC9336c6cf81f1: [Cashtab] Convert OP_RETURN input into TextArea
Summary

As per T1968:

  • Changed the current <Input> field for the optional OP_RETURN message into <TextArea> to ensure longer messages are visible by default.
  • The <TextArea> input also shows count to assist the user in composing the size of their message.
Test Plan
  • npm start
  • Navigate to Send, open the 'Advanced' section and ensure the Placeholder text is fully visible, indicating to the user that this is an optional OP_RETURN message input and is limited to 150 chars
  • Send a normal XEC transaction without the OP_RETURN message and ensure no regression to existing send function
  • Send message < 150 chars and ensure it is reflected in tx history and explorer
  • Attempt to send message > 150 chars and ensure the <TextArea> input prevents this as well as the character counter showing 150 at the limit.
  • Send message with bunch of spaces and ensure both tx history and explorer only shows a normal transation with no OP_RETURN message (useBCH.js ignores empty string messages)
  • verify cross browser compatibility with Firefox
  • npm run extension
  • verify the above in extension mode

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emack requested review of this revision.Nov 19 2021, 04:37

Please rebase to latest master to account for changes to the placeholder. Otherwise, looks good

This revision now requires changes to proceed.Nov 23 2021, 23:37
  • Rebased to master.
  • The addonBefore property within <TextArea> was redundant so moved it out to its own styling.
  • Message limit bumped up to 160
  • Tested across chrome and firefox
  • Tested across web view, extension view and physical mobile view
This revision is now accepted and ready to land.Nov 24 2021, 18:39