@ocap/state 1.17.5 → 1.17.6
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/tx.js +5 -5
- package/package.json +8 -8
package/lib/states/tx.js
CHANGED
|
@@ -20,12 +20,12 @@ const getTxReceiver = ({ tx, itx, typeUrl }) => {
|
|
|
20
20
|
return itx.to;
|
|
21
21
|
case 'MintAssetTx':
|
|
22
22
|
return itx.owner;
|
|
23
|
+
case 'CreateTokenTx':
|
|
24
|
+
case 'CreateAssetTx':
|
|
23
25
|
case 'AcquireAssetV2Tx':
|
|
24
26
|
return tx.delegator || tx.from;
|
|
25
27
|
case 'AcquireAssetV3Tx':
|
|
26
28
|
return itx.owner;
|
|
27
|
-
case 'CreateTokenTx':
|
|
28
|
-
return tx.from;
|
|
29
29
|
case 'SetupSwapTx':
|
|
30
30
|
return itx.receiver;
|
|
31
31
|
case 'StakeTx':
|
|
@@ -155,10 +155,10 @@ const getExchangeReceipts = (tx, ctx) => {
|
|
|
155
155
|
return [senderReceipt, receiverReceipt];
|
|
156
156
|
};
|
|
157
157
|
|
|
158
|
-
// TODO: we may charge user for creating nft factory, and that will lead to new receipt records
|
|
159
158
|
const getCreateAssetReceipts = (tx) => {
|
|
160
|
-
const
|
|
161
|
-
|
|
159
|
+
const owner = tx.delegator || tx.from;
|
|
160
|
+
const ownerReceipt = { address: owner, changes: [{ target: tx.itxJson.address, action: 'create', value: '1' }] };
|
|
161
|
+
return [ownerReceipt];
|
|
162
162
|
};
|
|
163
163
|
|
|
164
164
|
const getMintAssetReceipts = (tx) => {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.17.
|
|
6
|
+
"version": "1.17.6",
|
|
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.17.
|
|
20
|
-
"@arcblock/validator": "1.17.
|
|
21
|
-
"@ocap/contract": "1.17.
|
|
22
|
-
"@ocap/mcrypto": "1.17.
|
|
23
|
-
"@ocap/message": "1.17.
|
|
24
|
-
"@ocap/util": "1.17.
|
|
19
|
+
"@arcblock/did": "1.17.6",
|
|
20
|
+
"@arcblock/validator": "1.17.6",
|
|
21
|
+
"@ocap/contract": "1.17.6",
|
|
22
|
+
"@ocap/mcrypto": "1.17.6",
|
|
23
|
+
"@ocap/message": "1.17.6",
|
|
24
|
+
"@ocap/util": "1.17.6",
|
|
25
25
|
"bloom-filters": "^1.3.1",
|
|
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": "68e7711c1550c24505e4b8f5de1867a6ce360be8"
|
|
35
35
|
}
|