@ocap/tx-protocols 1.27.8 → 1.27.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/protocols/account/migrate.js +10 -0
- package/package.json +17 -17
|
@@ -15,6 +15,7 @@ const debug = require('debug')(`${require('../../../package.json').name}:migrate
|
|
|
15
15
|
|
|
16
16
|
const EnsureTxGas = require('../../pipes/ensure-gas');
|
|
17
17
|
const EnsureTxCost = require('../../pipes/ensure-cost');
|
|
18
|
+
const { decodeAnySafe } = require('../../util');
|
|
18
19
|
|
|
19
20
|
const runner = new Runner();
|
|
20
21
|
|
|
@@ -61,6 +62,15 @@ runner.use(
|
|
|
61
62
|
return { create: 0, update: 0, payment: 0 };
|
|
62
63
|
}
|
|
63
64
|
|
|
65
|
+
// Do not charge gas for connecting wallet from application
|
|
66
|
+
if (itx.data) {
|
|
67
|
+
const decoded = decodeAnySafe(itx.data);
|
|
68
|
+
if (decoded?.value && decoded.value.purpose === 'connect-wallet') {
|
|
69
|
+
Object.defineProperty(context, 'txBaseGas', { value: false });
|
|
70
|
+
return { create: 0, update: 0, payment: 0 };
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
64
74
|
return {
|
|
65
75
|
create: context.senderState ? 1 : 2,
|
|
66
76
|
update: context.senderState ? getRelatedAddresses(context.senderState).length : 0,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.27.
|
|
6
|
+
"version": "1.27.10",
|
|
7
7
|
"description": "Predefined tx pipeline sets to execute certain type of transactions",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -19,20 +19,20 @@
|
|
|
19
19
|
"empty-value": "^1.0.1",
|
|
20
20
|
"lodash": "^4.17.21",
|
|
21
21
|
"url-join": "^4.0.1",
|
|
22
|
-
"@arcblock/did": "1.27.
|
|
23
|
-
"@arcblock/did-util": "1.27.
|
|
24
|
-
"@arcblock/jwt": "1.27.
|
|
25
|
-
"@arcblock/
|
|
26
|
-
"@arcblock/
|
|
27
|
-
"@ocap/asset": "1.27.
|
|
28
|
-
"@ocap/
|
|
29
|
-
"@ocap/
|
|
30
|
-
"@ocap/
|
|
31
|
-
"@ocap/
|
|
32
|
-
"@ocap/
|
|
33
|
-
"@ocap/
|
|
34
|
-
"@ocap/util": "1.27.
|
|
35
|
-
"@ocap/wallet": "1.27.
|
|
22
|
+
"@arcblock/did": "1.27.10",
|
|
23
|
+
"@arcblock/did-util": "1.27.10",
|
|
24
|
+
"@arcblock/jwt": "1.27.10",
|
|
25
|
+
"@arcblock/vc": "1.27.10",
|
|
26
|
+
"@arcblock/validator": "1.27.10",
|
|
27
|
+
"@ocap/asset": "1.27.10",
|
|
28
|
+
"@ocap/client": "1.27.10",
|
|
29
|
+
"@ocap/mcrypto": "1.27.10",
|
|
30
|
+
"@ocap/merkle-tree": "1.27.10",
|
|
31
|
+
"@ocap/message": "1.27.10",
|
|
32
|
+
"@ocap/state": "1.27.10",
|
|
33
|
+
"@ocap/tx-pipeline": "1.27.10",
|
|
34
|
+
"@ocap/util": "1.27.10",
|
|
35
|
+
"@ocap/wallet": "1.27.10"
|
|
36
36
|
},
|
|
37
37
|
"resolutions": {
|
|
38
38
|
"bn.js": "5.2.2",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"jest": "^29.7.0",
|
|
43
43
|
"start-server-and-test": "^1.14.0",
|
|
44
|
-
"@ocap/e2e-test": "1.27.
|
|
45
|
-
"@ocap/statedb-memory": "1.27.
|
|
44
|
+
"@ocap/e2e-test": "1.27.10",
|
|
45
|
+
"@ocap/statedb-memory": "1.27.10"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"lint": "eslint tests lib",
|