@ocap/state 1.18.59 → 1.18.60

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.
@@ -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 = { address: owner, changes: [{ target: address, action: 'mint', value: '1' }] };
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.59",
6
+ "version": "1.18.60",
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.59",
20
- "@arcblock/validator": "1.18.59",
21
- "@ocap/contract": "1.18.59",
22
- "@ocap/mcrypto": "1.18.59",
23
- "@ocap/message": "1.18.59",
24
- "@ocap/util": "1.18.59",
19
+ "@arcblock/did": "1.18.60",
20
+ "@arcblock/validator": "1.18.60",
21
+ "@ocap/contract": "1.18.60",
22
+ "@ocap/mcrypto": "1.18.60",
23
+ "@ocap/message": "1.18.60",
24
+ "@ocap/util": "1.18.60",
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": "0376830a7ee13815fc4428330418079387e1fc30"
34
+ "gitHead": "0991b0393f9510fd1fe748be4776a9761ba3a831"
35
35
  }