From 5961536ed908473d840d121bae502949e898a6f6 Mon Sep 17 00:00:00 2001 From: Iveta Date: Mon, 4 Mar 2024 10:00:12 -0500 Subject: [PATCH] XDR: fix contract ID and type rendering --- src/helpers/extrapolateFromXdr.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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",