mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 20:25:48 +00:00
fix: encoding issue with encoding non-traditional currency codes (#1857)
* add test * fix decoding issue
This commit is contained in:
@@ -89,7 +89,7 @@ class Currency extends Hash160 {
|
||||
|
||||
if (this.bytes[0] !== 0) {
|
||||
this._iso = null
|
||||
} else if (code.toString('hex') === '000000') {
|
||||
} else if (/^0*$/.test(this.bytes.toString('hex'))) {
|
||||
this._iso = 'XRP'
|
||||
} else {
|
||||
this._iso = isoCodeFromHex(code)
|
||||
|
||||
Reference in New Issue
Block a user