@pioneer-platform/thor-network 8.1.31 → 8.1.35
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 +9 -8
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -176,12 +176,17 @@ var broadcast_transaction = function (tx) {
|
|
|
176
176
|
case 3:
|
|
177
177
|
result2 = _a.sent();
|
|
178
178
|
log.debug(tag, '** Broadcast ** REMOTE: result: ', result2.data);
|
|
179
|
-
if (result2.data.txhash)
|
|
179
|
+
if (result2 && result2.data && result2.data.txhash)
|
|
180
180
|
output.txid = result2.data.txhash;
|
|
181
181
|
//verify success
|
|
182
|
-
if (result2.data.raw_log) {
|
|
182
|
+
if (result2.data.raw_log && result2.data.raw_log !== '[]') {
|
|
183
183
|
logSend = result2.data.raw_log;
|
|
184
|
-
log.
|
|
184
|
+
log.info(tag, "logSend: ", logSend);
|
|
185
|
+
output.success = false;
|
|
186
|
+
output.error = logSend;
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
output.success = true;
|
|
185
190
|
}
|
|
186
191
|
output.height = result2.height;
|
|
187
192
|
output.gas_wanted = result2.gas_wanted;
|
|
@@ -200,11 +205,7 @@ var broadcast_transaction = function (tx) {
|
|
|
200
205
|
output.success = false;
|
|
201
206
|
output.error = e_2.response.data.error;
|
|
202
207
|
return [3 /*break*/, 5];
|
|
203
|
-
case 5:
|
|
204
|
-
if (output.txid) {
|
|
205
|
-
output.success = true;
|
|
206
|
-
}
|
|
207
|
-
return [2 /*return*/, output];
|
|
208
|
+
case 5: return [2 /*return*/, output];
|
|
208
209
|
case 6:
|
|
209
210
|
e_3 = _a.sent();
|
|
210
211
|
console.error(tag, "throw error: ", e_3);
|