Skip to content

Commit

Permalink
fix rejected tx
Browse files Browse the repository at this point in the history
  • Loading branch information
netbonus committed Oct 23, 2024
1 parent cd7dd1d commit 94072db
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 94072db

Please sign in to comment.