@snapshot-labs/snapshot.js 0.14.18 → 0.14.19

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.14.18",
3
+ "version": "0.14.19",
4
4
  "repository": "snapshot-labs/snapshot.js",
5
5
  "license": "MIT",
6
6
  "main": "dist/snapshot.cjs.js",
package/src/utils.ts CHANGED
@@ -734,14 +734,12 @@ async function getEnsSpaceController(
734
734
  ): Promise<string> {
735
735
  const spaceUri = await getSpaceUri(id, network, options);
736
736
  if (spaceUri) {
737
- let isUriAddress = isAddress(spaceUri);
738
- if (isUriAddress) return spaceUri;
737
+ if (isAddress(spaceUri)) return getAddress(spaceUri);
739
738
 
740
739
  const uriParts = spaceUri.split('/');
741
740
  const position = uriParts.includes('testnet') ? 5 : 4;
742
741
  const address = uriParts[position];
743
- isUriAddress = isAddress(address);
744
- if (isUriAddress) return address;
742
+ if (isAddress(address)) return getAddress(address);
745
743
  }
746
744
  return await getEnsOwner(id, network, options);
747
745
  }