Fix serialization of XRP in PathSets.

This commit is contained in:
Stefan Thomas
2013-07-29 18:28:37 -07:00
parent fd67ea3036
commit c48bf4089c

View File

@@ -136,7 +136,9 @@ var STHash160 = exports.Hash160 = new SerializedType({
var STCurrency = new SerializedType({
serialize: function (so, val) {
var currency = val.to_json();
if ("string" === typeof currency && currency.length === 3) {
if ("XRP" === currency) {
this.serialize_hex(so, UInt160.HEX_ZERO, true);
} else if ("string" === typeof currency && currency.length === 3) {
var currencyCode = currency.toUpperCase(),
currencyData = utils.arraySet(20, 0);