Closed matejcik closed 6 years ago
address_prefix
is used solely in the web wallet (and probably connect), so this change has to be coordinated with the guys developing it.
I am not against the change and I think it makes sense.
@mroz22 @mlejva can you please check where in webwallet/connect code do we use address_prefix
and whether it is worth changing the logic (i.e. webwallet/connect adds the :
character)
In webWallet, it appears that address_prefix is used only for qr code parsing:
So from webwallet perspective it is easy to adapt to such change.
We don't use it at all inside connect (so far)
Fixed via https://github.com/trezor/trezor-common/commit/c5045f066729dd3e650c3a61ec2dcfe01bccc8fa (where I renamed address_prefix
to uri_prefix
, because that's what it is and it will help us detect forgotten usage of this field).
@mroz22 please adapt the code in webwallet to use the uri_prefix
field and add ":" at the end of the value
build_coins.py
checks that theaddress_prefix
fields ends with a semicolon (see https://github.com/trezor/trezor-common/blob/master/tools/build_coins.py#L105, https://github.com/trezor/trezor-common/blob/master/defs/coins/crown.json#L33)That is a weird thing to enforce. ISTM the
address_prefix
should omit the semicolon and the check could instead match regex^[a-z0-9]+$
, and calling code should add the semicolon. (that is howcashaddr_prefix
seems to behave)