@ocap/resolver 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.
Files changed (2) hide show
  1. package/lib/index.js +4 -3
  2. package/package.json +12 -12
package/lib/index.js CHANGED
@@ -318,11 +318,12 @@ module.exports = class OCAPResolver {
318
318
  return JSON.stringify(this.config);
319
319
  }
320
320
 
321
- getAccountState({ address }, ctx) {
321
+ getAccountState({ address, traceMigration = true }, ctx) {
322
322
  return this._getState({
323
323
  table: 'account',
324
324
  id: address,
325
325
  dataKey: 'data',
326
+ extraParams: { traceMigration },
326
327
  onRead: async (state) => {
327
328
  if (state) {
328
329
  if (state.tokens) {
@@ -844,12 +845,12 @@ module.exports = class OCAPResolver {
844
845
  });
845
846
  }
846
847
 
847
- async _getState({ table, id, dataKey, onRead = noop, expandContext = true, ctx }) {
848
+ async _getState({ table, id, dataKey, extraParams = {}, onRead = noop, expandContext = true, ctx }) {
848
849
  if (!id) {
849
850
  throw new CustomError('INVALID_REQUEST', `Missing required parameter to read ${table} state`);
850
851
  }
851
852
 
852
- const state = await this.runAsLambda((txn) => this.statedb[table].get(id, { txn }));
853
+ const state = await this.runAsLambda((txn) => this.statedb[table].get(id, { txn, ...extraParams }));
853
854
  if (state) {
854
855
  if (dataKey) {
855
856
  set(state, dataKey, formatData(get(state, dataKey)));
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": "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": "^27.5.1"
23
23
  },
24
24
  "dependencies": {
25
- "@arcblock/did": "1.18.59",
26
- "@arcblock/did-util": "1.18.59",
27
- "@arcblock/validator": "1.18.59",
28
- "@ocap/config": "1.18.59",
29
- "@ocap/indexdb": "1.18.59",
30
- "@ocap/mcrypto": "1.18.59",
31
- "@ocap/message": "1.18.59",
32
- "@ocap/state": "1.18.59",
33
- "@ocap/tx-protocols": "1.18.59",
34
- "@ocap/util": "1.18.59",
25
+ "@arcblock/did": "1.18.60",
26
+ "@arcblock/did-util": "1.18.60",
27
+ "@arcblock/validator": "1.18.60",
28
+ "@ocap/config": "1.18.60",
29
+ "@ocap/indexdb": "1.18.60",
30
+ "@ocap/mcrypto": "1.18.60",
31
+ "@ocap/message": "1.18.60",
32
+ "@ocap/state": "1.18.60",
33
+ "@ocap/tx-protocols": "1.18.60",
34
+ "@ocap/util": "1.18.60",
35
35
  "debug": "^4.3.4",
36
36
  "lodash": "^4.17.21"
37
37
  },
38
- "gitHead": "0376830a7ee13815fc4428330418079387e1fc30"
38
+ "gitHead": "0991b0393f9510fd1fe748be4776a9761ba3a831"
39
39
  }