@ocap/tx-protocols 1.18.159 → 1.18.161

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.
Files changed (2) hide show
  1. package/lib/execute.js +5 -5
  2. package/package.json +14 -14
package/lib/execute.js CHANGED
@@ -148,15 +148,15 @@ module.exports = ({ filter, runAsLambda }) => {
148
148
  let txState = context.states.tx.create(ctx, error ? error.code || 'INTERNAL' : 'OK');
149
149
  flushEvents(ctx, { txState });
150
150
  await runAsLambda(async (txn) => {
151
- const newCtx = { ...omit(ctx, ['txn']), txn };
151
+ ctx = { ...omit(ctx, ['txn']), txn };
152
152
  if (error) {
153
- await ensureGasFeePaid(newCtx);
153
+ await ensureGasFeePaid(ctx);
154
154
  // Recreate tx to pick up gas related fields
155
- txState = context.states.tx.create(newCtx, error ? error.code || 'INTERNAL' : 'OK');
155
+ txState = context.states.tx.create(ctx, error ? error.code || 'INTERNAL' : 'OK');
156
156
  }
157
- await context.statedb.tx.create(txState.hash, txState, newCtx);
158
- flushEvents(newCtx, { txState });
157
+ await context.statedb.tx.create(txState.hash, txState, ctx);
159
158
  });
159
+ flushEvents(ctx, { txState });
160
160
  ctx?.logger?.info('Tx finalized', {
161
161
  txHash: ctx.txHash,
162
162
  txStatus: error ? error.code || 'INTERNAL' : 'OK',
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.18.159",
6
+ "version": "1.18.161",
7
7
  "description": "Predefined tx pipeline sets to execute certain type of transactions",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -21,18 +21,18 @@
21
21
  "author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "@arcblock/did": "1.18.159",
25
- "@arcblock/did-util": "1.18.159",
26
- "@arcblock/jwt": "1.18.159",
27
- "@arcblock/validator": "1.18.159",
28
- "@ocap/asset": "1.18.159",
29
- "@ocap/mcrypto": "1.18.159",
30
- "@ocap/merkle-tree": "1.18.159",
31
- "@ocap/message": "1.18.159",
32
- "@ocap/state": "1.18.159",
33
- "@ocap/tx-pipeline": "1.18.159",
34
- "@ocap/util": "1.18.159",
35
- "@ocap/wallet": "1.18.159",
24
+ "@arcblock/did": "1.18.161",
25
+ "@arcblock/did-util": "1.18.161",
26
+ "@arcblock/jwt": "1.18.161",
27
+ "@arcblock/validator": "1.18.161",
28
+ "@ocap/asset": "1.18.161",
29
+ "@ocap/mcrypto": "1.18.161",
30
+ "@ocap/merkle-tree": "1.18.161",
31
+ "@ocap/message": "1.18.161",
32
+ "@ocap/state": "1.18.161",
33
+ "@ocap/tx-pipeline": "1.18.161",
34
+ "@ocap/util": "1.18.161",
35
+ "@ocap/wallet": "1.18.161",
36
36
  "debug": "^4.3.6",
37
37
  "deep-diff": "^1.0.2",
38
38
  "empty-value": "^1.0.1",
@@ -47,5 +47,5 @@
47
47
  "jest": "^29.7.0",
48
48
  "start-server-and-test": "^1.14.0"
49
49
  },
50
- "gitHead": "a3afce50d8c10223be711b86417b75fc59672e12"
50
+ "gitHead": "5d8436fdf5218fcbf2218b77ae370d50617ba3d0"
51
51
  }