@ocap/state 1.18.59 → 1.18.61
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/account.js +1 -1
- package/lib/states/tx.js +6 -2
- package/package.json +8 -8
package/lib/states/account.js
CHANGED
|
@@ -31,7 +31,7 @@ const create = (attrs, context) => {
|
|
|
31
31
|
migratedFrom: [],
|
|
32
32
|
tokens: {},
|
|
33
33
|
context: createStateContext(context),
|
|
34
|
-
...pick(attrs, ['address', 'pk', 'issuer', 'moniker', 'data', 'nonce', 'migratedFrom', 'tokens']),
|
|
34
|
+
...pick(attrs, ['address', 'pk', 'issuer', 'moniker', 'data', 'nonce', 'migratedTo', 'migratedFrom', 'tokens']),
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
account.address = toAddress(ensureChecksumAddress(account.address));
|
package/lib/states/tx.js
CHANGED
|
@@ -163,9 +163,13 @@ const getCreateAssetReceipts = (tx) => {
|
|
|
163
163
|
return [ownerReceipt];
|
|
164
164
|
};
|
|
165
165
|
|
|
166
|
-
const getMintAssetReceipts = (tx) => {
|
|
166
|
+
const getMintAssetReceipts = (tx, ctx) => {
|
|
167
|
+
const { ownerState } = ctx;
|
|
167
168
|
const { assets = [], address, owner } = tx.itxJson;
|
|
168
|
-
const ownerReceipt = {
|
|
169
|
+
const ownerReceipt = {
|
|
170
|
+
address: ownerState ? ownerState.address : owner,
|
|
171
|
+
changes: [{ target: address, action: 'mint', value: '1' }],
|
|
172
|
+
};
|
|
169
173
|
assets.map((x) => ownerReceipt.changes.push({ target: x, action: 'consume', value: '-1' }));
|
|
170
174
|
return [ownerReceipt];
|
|
171
175
|
};
|
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.61",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
"coverage": "npm run test -- --coverage"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@arcblock/did": "1.18.
|
|
20
|
-
"@arcblock/validator": "1.18.
|
|
21
|
-
"@ocap/contract": "1.18.
|
|
22
|
-
"@ocap/mcrypto": "1.18.
|
|
23
|
-
"@ocap/message": "1.18.
|
|
24
|
-
"@ocap/util": "1.18.
|
|
19
|
+
"@arcblock/did": "1.18.61",
|
|
20
|
+
"@arcblock/validator": "1.18.61",
|
|
21
|
+
"@ocap/contract": "1.18.61",
|
|
22
|
+
"@ocap/mcrypto": "1.18.61",
|
|
23
|
+
"@ocap/message": "1.18.61",
|
|
24
|
+
"@ocap/util": "1.18.61",
|
|
25
25
|
"bloom-filters": "^1.3.9",
|
|
26
26
|
"lodash": "^4.17.21"
|
|
27
27
|
},
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"keywords": [],
|
|
32
32
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
33
33
|
"license": "MIT",
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "350ee5dcb48f4c335e13b59866fd1ad3f4189bfc"
|
|
35
35
|
}
|