HomePhabricator

[Cashtab][Alias] Switch alias registration fee lookup to api

Description

[Cashtab][Alias] Switch alias registration fee lookup to api

Summary:
T3216

Switching the registration fee lookup to the alias-server prices endpoint.

Test Plan:
Revised test plan (29th July)

  • grep -r aliasRegistrationFeeInSats src/ and ensure no output
  • npm test
  • Set alias flag to true in Ticker.js
  • npm start and navigate to the Alias page
  • Attempt to register an existing alias and observe the This alias [alias] has already been taken by <address>, please try another alias error notification
  • Input an unregistered alias, click Register Alias, verify the price on the preview modal, click Ok and ensure successful broadcast of the registration tx
  • In preparePreviewModal, change the queryAliasServer's alias endpoint to an invalid one, attempt to register an existing and unregistered alias and ensure the Error retrieving alias details pop up notification, the Registered aliases list being overwritten by Unable to retrieve alias info, please try again later and the Register Alias button is perma-disabled. It can be reset by reloading or re-navigating to the Alias page.
  • In preparePreviewModal, change the 2nd aliasInput param to aliasInput+'_' in the queryAliasServer call to simulate a valid error response. Observe the pop up error and the Registered aliases list being overwritten by Unable to retrieve alias info, please try again later. The Register Alias button is similarly perma-disabled because Cashtab should never let an invalid alias input flow all the way through to the alias-server.
  • Revert preparePreviewModal endpoints to its original valid state, repeat this simulation for the queryAliasServer call in useEffect() against the /address endpoint and observe similar errors on page load and perma-disabling of the Register Alias button. Ensure entering fresh inputs does not re-active the Register Alias button
  • Set the alias flag to false in Ticker.js
  • Sanity check via sending XEC txs

Reviewers: bytesofman, #bitcoin_abc, Fabien

Reviewed By: bytesofman, #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D14247

Details

Provenance
emackAuthored on Jul 11 2023, 09:15
emackPushed on Jul 31 2023, 22:36
Reviewer
Restricted Project
Differential Revision
D14247: [Cashtab][Alias] Switch alias registration fee lookup to api
Parents
rABCa7deb9f1832f: [e.cash] Add /get-ecash link to navbar price box
Branches
Unknown
Tags
Unknown