mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-03 10:35:49 +00:00
Fix currency in path_rewrite
This commit is contained in:
@@ -242,19 +242,19 @@ Transaction.prototype.destination_tag = function (tag) {
|
||||
}
|
||||
|
||||
Transaction._path_rewrite = function (path) {
|
||||
var props = [
|
||||
'account'
|
||||
, 'issuer'
|
||||
, 'currency'
|
||||
]
|
||||
|
||||
var path_new = path.map(function(node) {
|
||||
var node_new = { };
|
||||
|
||||
for (var prop in node) {
|
||||
if (~props.indexOf(prop)) {
|
||||
node_new[prop] = UInt160.json_rewrite(node[prop]);
|
||||
}
|
||||
if (node.hasOwnProperty('account')) {
|
||||
node_new.account = UInt160.json_rewrite(node.account);
|
||||
}
|
||||
|
||||
if (node.hasOwnProperty('issuer')) {
|
||||
node_new.issuer = UInt160.json_rewrite(node.issuer);
|
||||
}
|
||||
|
||||
if (node.hasOwnProperty('currency')) {
|
||||
node_new.currency = Currency.json_rewrite(node.currency);
|
||||
}
|
||||
|
||||
return node_new;
|
||||
|
||||
Reference in New Issue
Block a user