@snapshot-labs/snapshot.js 0.9.4 → 0.9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snapshot-labs/snapshot.js",
3
- "version": "0.9.4",
3
+ "version": "0.9.6",
4
4
  "repository": "snapshot-labs/snapshot.js",
5
5
  "license": "MIT",
6
6
  "main": "dist/snapshot.cjs.js",
@@ -1,5 +1,5 @@
1
1
  {
2
- "1": "https://subgrapher.snapshot.org/gateway.thegraph.com/api/0f15b42bdeff7a063a4e1757d7e2f99e/deployments/id/QmXZiV6S13ha6QXq4dmaM3TB4CHcDxBMvGexSNu9Kc28EH",
2
+ "1": "https://subgrapher.snapshot.org/gateway-arbitrum.network.thegraph.com/api/0f15b42bdeff7a063a4e1757d7e2f99e/subgraphs/id/4YgtogVaqoM8CErHWDK8mKQ825BcVdKB8vBYmb4avAQo",
3
3
  "5": "https://subgrapher.snapshot.org/api.thegraph.com/subgraphs/name/snapshot-labs/snapshot-goerli",
4
4
  "10": "https://subgrapher.snapshot.org/api.thegraph.com/subgraphs/name/snapshot-labs/snapshot-optimism",
5
5
  "56": "https://subgrapher.snapshot.org/api.thegraph.com/subgraphs/name/snapshot-labs/snapshot-binance-smart-chain",
package/src/utils.ts CHANGED
@@ -78,9 +78,6 @@ const networksIds = Object.keys(networks);
78
78
  const mainnetNetworkIds = Object.keys(networks).filter(
79
79
  (id) => !networks[id].testnet
80
80
  );
81
- const testnetNetworkIds = Object.keys(networks).filter(
82
- (id) => networks[id].testnet
83
- );
84
81
 
85
82
  ajv.addKeyword({
86
83
  keyword: 'snapshotNetwork',
@@ -88,11 +85,10 @@ ajv.addKeyword({
88
85
  // @ts-ignore
89
86
  const snapshotEnv = this.snapshotEnv || 'default';
90
87
  if (snapshotEnv === 'mainnet') return mainnetNetworkIds.includes(data);
91
- if (snapshotEnv === 'testnet') return testnetNetworkIds.includes(data);
92
88
  return networksIds.includes(data);
93
89
  },
94
90
  error: {
95
- message: 'must be a valid network used by snapshot'
91
+ message: 'network not allowed'
96
92
  }
97
93
  });
98
94