18 lines
570 B
JavaScript
18 lines
570 B
JavaScript
|
|
"use strict";
|
||
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||
|
|
exports.getTransactionLastResult = void 0;
|
||
|
|
/** @hidden */
|
||
|
|
function getTransactionLastResult(txResult) {
|
||
|
|
if (typeof txResult.status === 'object' && typeof txResult.status.SuccessValue === 'string') {
|
||
|
|
const value = Buffer.from(txResult.status.SuccessValue, 'base64').toString();
|
||
|
|
try {
|
||
|
|
return JSON.parse(value);
|
||
|
|
}
|
||
|
|
catch (e) {
|
||
|
|
return value;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
return null;
|
||
|
|
}
|
||
|
|
exports.getTransactionLastResult = getTransactionLastResult;
|