@pioneer-platform/maya-network 8.3.8 → 8.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +14 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -316,7 +316,7 @@ var get_transaction = function (txid) {
|
|
|
316
316
|
};
|
|
317
317
|
var broadcast_transaction = function (tx) {
|
|
318
318
|
return __awaiter(this, void 0, void 0, function () {
|
|
319
|
-
var tag, output, payload, urlRemote, result2, e_7, e_8;
|
|
319
|
+
var tag, output, payload, urlRemote, result2, logSend, e_7, e_8;
|
|
320
320
|
return __generator(this, function (_a) {
|
|
321
321
|
switch (_a.label) {
|
|
322
322
|
case 0:
|
|
@@ -354,7 +354,19 @@ var broadcast_transaction = function (tx) {
|
|
|
354
354
|
log.info(tag, '** Broadcast ** REMOTE: result: ', JSON.stringify(result2.data));
|
|
355
355
|
if (result2.data.txhash)
|
|
356
356
|
output.txid = result2.data.txhash;
|
|
357
|
-
|
|
357
|
+
//tx_response
|
|
358
|
+
if (result2.data.tx_response.txhash)
|
|
359
|
+
output.txid = result2.data.tx_response.txhash;
|
|
360
|
+
if (result2.data.tx_response.raw_log && result2.data.tx_response.raw_log !== '[]') {
|
|
361
|
+
logSend = result2.data.tx_response.raw_log;
|
|
362
|
+
log.debug(tag, "logSend: ", logSend);
|
|
363
|
+
output.success = false;
|
|
364
|
+
output.error = logSend;
|
|
365
|
+
}
|
|
366
|
+
else {
|
|
367
|
+
output.success = true;
|
|
368
|
+
}
|
|
369
|
+
return [2 /*return*/, output];
|
|
358
370
|
case 4:
|
|
359
371
|
e_7 = _a.sent();
|
|
360
372
|
//log.error(tag,"failed second broadcast e: ",e.response)
|