HomePhabricator

[ecash-lib] Better behavior of withPrefix() method in Address class

Description

[ecash-lib] Better behavior of withPrefix() method in Address class

Summary: We could expect a user to call withPrefix("ecash:") on, say, every address in an array of ecash: addresses to ensure they all have the same prefix. Better to return unchanged if no prefix change than to throw an error. Do it that way.

Test Plan: npm test, CI

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Subscribers: tobias_ruck

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

Details

Provenance
bytesofmanAuthored on Jan 31 2025, 23:44
bytesofmanPushed on Feb 3 2025, 12:49
Reviewer
Restricted Project
Differential Revision
D17623: [ecash-lib] Better behavior of withPrefix() method in Address class
Parents
rABCe27f29ba4083: [Cashtab] Always show send button on send screen
Branches
Unknown
Tags
Unknown