mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-21 04:35:49 +00:00
Add tests for parsing lower-case hex-strings (#97)
Add one test suite to verify that ripple-binary-codec could handle lower-case hex-strings.
This commit is contained in:
@@ -161,7 +161,7 @@ class Amount extends SerializedType {
|
||||
|
||||
return {
|
||||
value: value.toString(),
|
||||
currency: currency.toJSON(),
|
||||
currency: currency.toJSON(),
|
||||
issuer: issuer.toJSON(),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -116,7 +116,9 @@ class Hop extends SerializedType {
|
||||
const hopParser = new BinaryParser(this.bytes.toString("hex"));
|
||||
const type = hopParser.readUInt8();
|
||||
|
||||
let account, currency, issuer: string | undefined = undefined
|
||||
let account,
|
||||
currency,
|
||||
issuer: string | undefined = undefined;
|
||||
if (type & TYPE_ACCOUNT) {
|
||||
account = (AccountID.fromParser(hopParser) as AccountID).toJSON();
|
||||
}
|
||||
@@ -128,7 +130,7 @@ class Hop extends SerializedType {
|
||||
if (type & TYPE_ISSUER) {
|
||||
issuer = (AccountID.fromParser(hopParser) as AccountID).toJSON();
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
account: account,
|
||||
issuer: issuer,
|
||||
|
||||
Reference in New Issue
Block a user