Page MenuHomePhabricator

[Cashtab] currency.prefixes & currency.tokenPrefixes converted to strings
ClosedPublic

Authored by kieran709 on Jul 12 2022, 19:09.

Details

Summary

Related to T2100. currency.prefixes and currency.tokenPrefixes have been converted from arrays to strings.

Test Plan

cd web/cashtab
grep -r 'currency.prefixes' src/ should return nothing
grep -r 'currency.tokenPrefixes' should return nothing.

As neither prefix is used in the app, no other testing should be required as changing the type will have no impact on existing code.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
convert-prefixes-to-string
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 19624
Build 38967: Build Diffcashtab-tests
Build 38966: arc lint + arc unit

Event Timeline

If these entries are no longer used anywhere in the app, please remove them from the currency object

This revision now requires changes to proceed.Jul 19 2022, 21:20

I noticed that in ScanQrCode there is a reference on line 72 to currency.tokenPrefix, which does not exist in the currency object, so it will not be a problem to remove them altogether, but we may need another task / diff to fix what is happening in ScanQrCode.

I noticed that in ScanQrCode there is a reference on line 72 to currency.tokenPrefix, which does not exist in the currency object, so it will not be a problem to remove them altogether, but we may need another task / diff to fix what is happening in ScanQrCode.

Please create a task to correct this and assign it to yourself.

Rebased to master, removed unused currency.prefixes key/value from currency obj, changed currency.tokenPrefixes to a string.

grep -r 'currency.tokenPrefixes' should return nothing.

This is still being used in ScanQRCode.js

Reviewing that document, it's only used to trigger an analytics event, which we aren't using for anything.

So, please remove it from that file, then also remove it from Ticker.js

This revision now requires changes to proceed.Sep 21 2022, 23:20

Responding to review feedback, removed GA event from ScanQrCode, removed imports for currency obj & GA. Removed tokenprefixes key/value pair from currency obj.

This revision is now accepted and ready to land.Sep 22 2022, 20:19