Remove "type" from PathSet JSON format

This commit is contained in:
Chris Clark
2015-10-13 15:15:21 -07:00
parent 3c3e7ca2eb
commit 9e3c037491
4 changed files with 15 additions and 30 deletions

View File

@@ -34,7 +34,7 @@ const Hop = makeClass({
},
toJSON() {
const type = this.type();
const ret = {type};
const ret = {};
(type & TYPE_ACCOUNT) && (ret.account = this.account.toJSON());
(type & TYPE_ISSUER) && (ret.issuer = this.issuer.toJSON());
(type & TYPE_CURRENCY) && (ret.currency = this.currency.toJSON());