@ocap/tx-protocols 1.20.7 → 1.20.9
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/execute.js +12 -2
- package/package.json +16 -16
package/lib/execute.js
CHANGED
|
@@ -95,7 +95,11 @@ module.exports = ({ filter, runAsLambda }) => {
|
|
|
95
95
|
new Promise((resolve, reject) => {
|
|
96
96
|
pre.run(context, (err) => {
|
|
97
97
|
if (err) {
|
|
98
|
-
context.logger?.error('Failed to prepare transaction', {
|
|
98
|
+
context.logger?.error('Failed to prepare transaction', {
|
|
99
|
+
error: err,
|
|
100
|
+
txHash: context.txHash,
|
|
101
|
+
request: context.extra?.request,
|
|
102
|
+
});
|
|
99
103
|
return reject(err);
|
|
100
104
|
}
|
|
101
105
|
|
|
@@ -189,7 +193,12 @@ module.exports = ({ filter, runAsLambda }) => {
|
|
|
189
193
|
const txStatus = error.code || 'INTERNAL';
|
|
190
194
|
let txState = ctx.tx ? context.states.tx.create(ctx, txStatus, false) : null;
|
|
191
195
|
|
|
192
|
-
ctx.logger?.error('Failed to execute transaction', {
|
|
196
|
+
ctx.logger?.error('Failed to execute transaction', {
|
|
197
|
+
error,
|
|
198
|
+
txHash: ctx.txHash,
|
|
199
|
+
txState,
|
|
200
|
+
request: context.extra?.request,
|
|
201
|
+
});
|
|
193
202
|
|
|
194
203
|
if (txState && shouldPersistTx(error)) {
|
|
195
204
|
// Avoid sync data in failed transactions to indexdb
|
|
@@ -227,6 +236,7 @@ module.exports = ({ filter, runAsLambda }) => {
|
|
|
227
236
|
txError: error,
|
|
228
237
|
txHash: ctx.txHash,
|
|
229
238
|
txState,
|
|
239
|
+
request: context.extra?.request,
|
|
230
240
|
});
|
|
231
241
|
// If we get an error here, should return the original tx error to client
|
|
232
242
|
throw error;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.20.
|
|
6
|
+
"version": "1.20.9",
|
|
7
7
|
"description": "Predefined tx pipeline sets to execute certain type of transactions",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -18,20 +18,19 @@
|
|
|
18
18
|
"empty-value": "^1.0.1",
|
|
19
19
|
"lodash": "^4.17.21",
|
|
20
20
|
"url-join": "^4.0.1",
|
|
21
|
-
"@arcblock/did": "1.20.
|
|
22
|
-
"@arcblock/did-util": "1.20.
|
|
23
|
-
"@arcblock/jwt": "1.20.
|
|
24
|
-
"@arcblock/validator": "1.20.
|
|
25
|
-
"@ocap/asset": "1.20.
|
|
26
|
-
"@ocap/
|
|
27
|
-
"@ocap/
|
|
28
|
-
"@ocap/
|
|
29
|
-
"@ocap/
|
|
30
|
-
"@ocap/
|
|
31
|
-
"@ocap/
|
|
32
|
-
"@ocap/
|
|
33
|
-
"@ocap/
|
|
34
|
-
"@ocap/tx-pipeline": "1.20.7"
|
|
21
|
+
"@arcblock/did": "1.20.9",
|
|
22
|
+
"@arcblock/did-util": "1.20.9",
|
|
23
|
+
"@arcblock/jwt": "1.20.9",
|
|
24
|
+
"@arcblock/validator": "1.20.9",
|
|
25
|
+
"@ocap/asset": "1.20.9",
|
|
26
|
+
"@ocap/client": "1.20.9",
|
|
27
|
+
"@ocap/mcrypto": "1.20.9",
|
|
28
|
+
"@ocap/merkle-tree": "1.20.9",
|
|
29
|
+
"@ocap/message": "1.20.9",
|
|
30
|
+
"@ocap/tx-pipeline": "1.20.9",
|
|
31
|
+
"@ocap/state": "1.20.9",
|
|
32
|
+
"@ocap/util": "1.20.9",
|
|
33
|
+
"@ocap/wallet": "1.20.9"
|
|
35
34
|
},
|
|
36
35
|
"resolutions": {
|
|
37
36
|
"bn.js": "5.2.1",
|
|
@@ -40,7 +39,8 @@
|
|
|
40
39
|
"devDependencies": {
|
|
41
40
|
"jest": "^29.7.0",
|
|
42
41
|
"start-server-and-test": "^1.14.0",
|
|
43
|
-
"@ocap/e2e-test": "1.20.
|
|
42
|
+
"@ocap/e2e-test": "1.20.9",
|
|
43
|
+
"@ocap/statedb-memory": "1.20.9"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"lint": "eslint tests lib",
|