@ocap/resolver 1.13.62 → 1.13.63
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/index.js +17 -2
- package/package.json +11 -11
package/lib/index.js
CHANGED
|
@@ -901,7 +901,14 @@ module.exports = class OCAPResolver {
|
|
|
901
901
|
return [];
|
|
902
902
|
}
|
|
903
903
|
|
|
904
|
-
const rollupTxs = [
|
|
904
|
+
const rollupTxs = [
|
|
905
|
+
'DepositTokenV2Tx',
|
|
906
|
+
'WithdrawTokenV2Tx',
|
|
907
|
+
'JoinRollupTx',
|
|
908
|
+
'LeaveRollupTx',
|
|
909
|
+
'CreateRollupBlockTx',
|
|
910
|
+
'ClaimBlockRewardTx',
|
|
911
|
+
];
|
|
905
912
|
const typeUrl = formatTxType(tx.tx.itxJson._type);
|
|
906
913
|
const tokens = [];
|
|
907
914
|
|
|
@@ -924,13 +931,21 @@ module.exports = class OCAPResolver {
|
|
|
924
931
|
'address'
|
|
925
932
|
).filter((x) => x.address)
|
|
926
933
|
);
|
|
927
|
-
} else if (
|
|
934
|
+
} else if (typeUrl === 'RevokeStakeTx') {
|
|
928
935
|
tokens.push(
|
|
929
936
|
...uniqBy(
|
|
930
937
|
tx.tx.itxJson.outputs.reduce((acc, x) => acc.concat(x.tokens), []),
|
|
931
938
|
'address'
|
|
932
939
|
).filter((x) => x.address)
|
|
933
940
|
);
|
|
941
|
+
} else if (typeUrl === 'ClaimStakeTx') {
|
|
942
|
+
const revokeTx = await this.indexdb.tx.get(tx.tx.itxJson.evidence.hash);
|
|
943
|
+
tokens.push(
|
|
944
|
+
...uniqBy(
|
|
945
|
+
revokeTx.tx.itxJson.outputs.reduce((acc, x) => acc.concat(x.tokens), []),
|
|
946
|
+
'address'
|
|
947
|
+
).filter((x) => x.address)
|
|
948
|
+
);
|
|
934
949
|
} else if (rollupTxs.includes(typeUrl)) {
|
|
935
950
|
const rollup = await this.indexdb.rollup.get(tx.tx.itxJson.rollup);
|
|
936
951
|
tokens.push({ address: rollup.tokenAddress, value: '0' });
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.13.
|
|
6
|
+
"version": "1.13.63",
|
|
7
7
|
"description": "GraphQL resolver built upon ocap statedb and GQL layer",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -22,17 +22,17 @@
|
|
|
22
22
|
"jest": "^27.3.1"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@arcblock/did": "1.13.
|
|
26
|
-
"@arcblock/did-util": "1.13.
|
|
27
|
-
"@ocap/config": "1.13.
|
|
28
|
-
"@ocap/indexdb": "1.13.
|
|
29
|
-
"@ocap/mcrypto": "1.13.
|
|
30
|
-
"@ocap/message": "1.13.
|
|
31
|
-
"@ocap/state": "1.13.
|
|
32
|
-
"@ocap/tx-protocols": "1.13.
|
|
33
|
-
"@ocap/util": "1.13.
|
|
25
|
+
"@arcblock/did": "1.13.63",
|
|
26
|
+
"@arcblock/did-util": "1.13.63",
|
|
27
|
+
"@ocap/config": "1.13.63",
|
|
28
|
+
"@ocap/indexdb": "1.13.63",
|
|
29
|
+
"@ocap/mcrypto": "1.13.63",
|
|
30
|
+
"@ocap/message": "1.13.63",
|
|
31
|
+
"@ocap/state": "1.13.63",
|
|
32
|
+
"@ocap/tx-protocols": "1.13.63",
|
|
33
|
+
"@ocap/util": "1.13.63",
|
|
34
34
|
"debug": "^4.3.2",
|
|
35
35
|
"lodash": "^4.17.21"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "7e40f22f90f4f5ac08fde3d4d3b7194aa792c95d"
|
|
38
38
|
}
|