Skip to content

Add (blockchain) scheme conditional to handle BIP-21 amount conversions.

Modenero requested to merge modenero/wally-wallet:nexa-bip21-denomination into nexa

Currently when providing ?amount= in a URI, the Nexa blockchain will populate the tx value as denominated in MEX. This is inconsistent with other Nexa denominations that have been converted to 1 millionth of the BTC/BCH equivalent (1/1000000), and is now represented as NEX.

I suggest that the BIP-21 amount should be denominated in NEX and therefore when converted to KEX (the default currency type) it should be divided and NOT multiplied, as it currently is today (for converting BCH to mBCH).

This is a "simple" fix to resolve the issue safely. However, it DOES NOT account for any changes in currency type (eg. MEX, NEX, BCH, bits, etc). It shouldn't be a problem for now, as the wallet only supports ONE currency type (KEX and mBCH) for each respective coin.

Merge request reports