@ocap/state 1.18.154 → 1.18.156
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/states/blacklist.js +8 -0
- package/lib/states/tx.js +12 -6
- package/package.json +9 -9
package/lib/states/blacklist.js
CHANGED
|
@@ -80,6 +80,14 @@ class Blacklist {
|
|
|
80
80
|
return false;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
async getTrustedAccountConfig(address) {
|
|
84
|
+
if (typeof this.getTrustedAccounts === 'function') {
|
|
85
|
+
const trustedAccounts = await this.getTrustedAccounts();
|
|
86
|
+
return trustedAccounts.find((x) => isSameDid(x.address, address));
|
|
87
|
+
}
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
|
|
83
91
|
dump() {
|
|
84
92
|
try {
|
|
85
93
|
const exported = this.filter.saveAsJSON();
|
package/lib/states/tx.js
CHANGED
|
@@ -437,12 +437,18 @@ const getMigrateReceipts = (tx, { fromState }) => {
|
|
|
437
437
|
if (!fromState?.tokens) return [];
|
|
438
438
|
if (!tx.itxJson?.address) return [];
|
|
439
439
|
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
440
|
+
const changes = fromState.tokens
|
|
441
|
+
.filter((x) => x.value && x.value !== '0')
|
|
442
|
+
.map((x) => ({ target: x.address, action: 'migrate', value: x.value }));
|
|
443
|
+
|
|
444
|
+
return changes.length
|
|
445
|
+
? [
|
|
446
|
+
{
|
|
447
|
+
address: tx.itxJson.address,
|
|
448
|
+
changes,
|
|
449
|
+
},
|
|
450
|
+
]
|
|
451
|
+
: [];
|
|
446
452
|
};
|
|
447
453
|
|
|
448
454
|
const getDeclareReceipts = (tx, { config, time }) => {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.18.
|
|
6
|
+
"version": "1.18.156",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"coverage": "start-server-and-test start http://127.0.0.1:4001 test:ci"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@arcblock/did": "1.18.
|
|
22
|
-
"@arcblock/validator": "1.18.
|
|
23
|
-
"@ocap/contract": "1.18.
|
|
24
|
-
"@ocap/mcrypto": "1.18.
|
|
25
|
-
"@ocap/message": "1.18.
|
|
26
|
-
"@ocap/util": "1.18.
|
|
27
|
-
"@ocap/wallet": "1.18.
|
|
21
|
+
"@arcblock/did": "1.18.156",
|
|
22
|
+
"@arcblock/validator": "1.18.156",
|
|
23
|
+
"@ocap/contract": "1.18.156",
|
|
24
|
+
"@ocap/mcrypto": "1.18.156",
|
|
25
|
+
"@ocap/message": "1.18.156",
|
|
26
|
+
"@ocap/util": "1.18.156",
|
|
27
|
+
"@ocap/wallet": "1.18.156",
|
|
28
28
|
"bloom-filters": "^1.3.9",
|
|
29
29
|
"lodash": "^4.17.21"
|
|
30
30
|
},
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"keywords": [],
|
|
36
36
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
37
37
|
"license": "MIT",
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "955c3e7ae8e06fc037e6591267babaae1623ef23"
|
|
39
39
|
}
|