@ocap/resolver 1.18.145 → 1.18.147

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 CHANGED
@@ -962,6 +962,15 @@ module.exports = class OCAPResolver {
962
962
  tx.receipts = getTxReceipts(tx, { config: this.config });
963
963
  }
964
964
 
965
+ if (get(tx, 'tx.itxJson.type_url') === 'fg:t:revoke_withdraw') {
966
+ const withdrawHash = get(tx, 'tx.itxJson.withdraw_tx_hash');
967
+ // Avoid infinite loop by invalid data
968
+ if (withdrawHash && withdrawHash !== tx.hash) {
969
+ const withdrawTx = await this.getTx({ hash: withdrawHash }, ctx);
970
+ tx.receipts = getTxReceipts(tx, { config: this.config, withdrawTx });
971
+ }
972
+ }
973
+
965
974
  // https://github.com/blocklet/abt-wallet/issues/681
966
975
  if (get(tx, 'tx.itxJson.type_url') === 'fg:t:deposit_token') {
967
976
  tx.receipts = getTxReceipts(tx, { config: this.config });
package/lib/token-flow.js CHANGED
@@ -158,7 +158,7 @@ const verifyAccountRisk = async ({ accountAddress, tokenAddress }, resolver, ctx
158
158
  const transactions = await resolver._getAllResults('transactions', (paging) =>
159
159
  resolver.listTransactions({ paging, accountFilter: { accounts: [address] } }, ctx)
160
160
  );
161
- const accountState = await resolver.getAccountState({ address }, ctx);
161
+ const accountState = await resolver.getAccountState({ address, traceMigration: false }, ctx);
162
162
  if (!accountState) {
163
163
  throw new CustomError('INVALID_REQUEST', `Invalid address ${address}`);
164
164
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.18.145",
6
+ "version": "1.18.147",
7
7
  "description": "GraphQL resolver built upon ocap statedb and GQL layer",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -22,18 +22,18 @@
22
22
  "jest": "^29.7.0"
23
23
  },
24
24
  "dependencies": {
25
- "@arcblock/did": "1.18.145",
26
- "@arcblock/did-util": "1.18.145",
27
- "@arcblock/validator": "1.18.145",
28
- "@ocap/config": "1.18.145",
29
- "@ocap/indexdb": "1.18.145",
30
- "@ocap/mcrypto": "1.18.145",
31
- "@ocap/message": "1.18.145",
32
- "@ocap/state": "1.18.145",
33
- "@ocap/tx-protocols": "1.18.145",
34
- "@ocap/util": "1.18.145",
25
+ "@arcblock/did": "1.18.147",
26
+ "@arcblock/did-util": "1.18.147",
27
+ "@arcblock/validator": "1.18.147",
28
+ "@ocap/config": "1.18.147",
29
+ "@ocap/indexdb": "1.18.147",
30
+ "@ocap/mcrypto": "1.18.147",
31
+ "@ocap/message": "1.18.147",
32
+ "@ocap/state": "1.18.147",
33
+ "@ocap/tx-protocols": "1.18.147",
34
+ "@ocap/util": "1.18.147",
35
35
  "debug": "^4.3.6",
36
36
  "lodash": "^4.17.21"
37
37
  },
38
- "gitHead": "52b533ef56196496dc068fbf86ea07afbb87366e"
38
+ "gitHead": "bd5eff834975d76fdb3fcd1e347f21f47e900154"
39
39
  }