diff --git a/src/helpers/extrapolateFromXdr.js b/src/helpers/extrapolateFromXdr.js index c937eeb5..f4161b05 100644 --- a/src/helpers/extrapolateFromXdr.js +++ b/src/helpers/extrapolateFromXdr.js @@ -183,7 +183,7 @@ export default function extrapolateFromXdr(input, type) { return object.toString(); } - if (name === "contractId") { + if (name === "contractId" && object) { return StrKey.encodeContract(object); } @@ -195,6 +195,10 @@ export default function extrapolateFromXdr(input, type) { return JSON.stringify(object); } + if (name === "type") { + return JSON.stringify(object); + } + if (object && object._isBuffer) { return { type: "code",