From 94072db4c7ae60a99182179e8f7777f5891f5d50 Mon Sep 17 00:00:00 2001 From: netbonus <151201453+netbonus@users.noreply.github.com> Date: Wed, 23 Oct 2024 15:24:00 -0400 Subject: [PATCH] fix rejected tx --- src/util.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/util.ts b/src/util.ts index 6b3f0e15..456f71d5 100644 --- a/src/util.ts +++ b/src/util.ts @@ -79,12 +79,10 @@ export const parseLattice1Response = function (r: string): { // Get response code const responseCode = payload.readUInt8(0); if (responseCode !== LatticeResponseCode.success) { - if (parsed instanceof LatticeResponseError) { - const errMsg = ProtocolConstants.responseMsg[responseCode]; - parsed.errorMessage = `[Lattice] ${errMsg ? errMsg : 'Unknown Error'}`; - parsed.responseCode = responseCode; - return parsed; - } + const errMsg = ProtocolConstants.responseMsg[responseCode]; + parsed.errorMessage = `[Lattice] ${errMsg ? errMsg : 'Unknown Error'}`; + parsed.responseCode = responseCode; + return parsed; } else { parsed.data = payload.slice(1, payload.length); }