@pioneer-platform/maya-network 8.9.0 → 8.11.0
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/CHANGELOG.md +22 -0
- package/lib/index.js +15 -10
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @pioneer-platform/maya-network
|
|
2
2
|
|
|
3
|
+
## 8.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Automated minor version bump for all packages
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @pioneer-platform/loggerdog@8.11.0
|
|
13
|
+
|
|
14
|
+
## 8.10.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- Automated minor version bump for all packages
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
- @pioneer-platform/loggerdog@8.10.0
|
|
24
|
+
|
|
3
25
|
## 8.9.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/lib/index.js
CHANGED
|
@@ -317,7 +317,7 @@ var get_transaction = function (txid) {
|
|
|
317
317
|
};
|
|
318
318
|
var broadcast_transaction = function (tx) {
|
|
319
319
|
return __awaiter(this, void 0, void 0, function () {
|
|
320
|
-
var tag, output, payload, urlRemote, result2,
|
|
320
|
+
var tag, output, payload, urlRemote, result2, errorMsg, e_7, e_8;
|
|
321
321
|
return __generator(this, function (_a) {
|
|
322
322
|
switch (_a.label) {
|
|
323
323
|
case 0:
|
|
@@ -353,20 +353,25 @@ var broadcast_transaction = function (tx) {
|
|
|
353
353
|
result2 = _a.sent();
|
|
354
354
|
log.info(tag, '** Broadcast ** REMOTE: result: ', result2.data);
|
|
355
355
|
log.info(tag, '** Broadcast ** REMOTE: result: ', JSON.stringify(result2.data));
|
|
356
|
+
// CRITICAL: Check tx_response.code - Cosmos standard for success/error
|
|
357
|
+
// code: 0 = success, any other code = error
|
|
358
|
+
if (result2.data.tx_response && result2.data.tx_response.code !== 0) {
|
|
359
|
+
errorMsg = result2.data.tx_response.raw_log || 'Transaction failed with unknown error';
|
|
360
|
+
log.error(tag, "❌ Broadcast FAILED - code:", result2.data.tx_response.code);
|
|
361
|
+
log.error(tag, " Error:", errorMsg);
|
|
362
|
+
output.success = false;
|
|
363
|
+
output.error = errorMsg;
|
|
364
|
+
// Throw error to fail fast - don't let failed transactions proceed
|
|
365
|
+
throw new Error("Broadcast failed (code ".concat(result2.data.tx_response.code, "): ").concat(errorMsg));
|
|
366
|
+
}
|
|
367
|
+
// Only set txid if transaction was successful (code === 0)
|
|
356
368
|
if (result2.data.txhash)
|
|
357
369
|
output.txid = result2.data.txhash;
|
|
358
370
|
//tx_response
|
|
359
371
|
if (result2.data.tx_response.txhash)
|
|
360
372
|
output.txid = result2.data.tx_response.txhash;
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
log.debug(tag, "logSend: ", logSend);
|
|
364
|
-
output.success = false;
|
|
365
|
-
output.error = logSend;
|
|
366
|
-
}
|
|
367
|
-
else {
|
|
368
|
-
output.success = true;
|
|
369
|
-
}
|
|
373
|
+
output.success = true;
|
|
374
|
+
log.info(tag, "✅ Broadcast SUCCESS - txid:", output.txid);
|
|
370
375
|
return [2 /*return*/, output];
|
|
371
376
|
case 4:
|
|
372
377
|
e_7 = _a.sent();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pioneer-platform/maya-network",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.11.0",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"types": "./lib/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"refresh": "rm -rf ./node_modules ./package-lock.json && pnpm install"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@pioneer-platform/loggerdog": "^8.
|
|
14
|
+
"@pioneer-platform/loggerdog": "^8.11.0",
|
|
15
15
|
"axios-retry": "^3.3.1",
|
|
16
16
|
"bech32": "^1.1.4",
|
|
17
17
|
"bip32": "^2.0.5",
|