@0xsequence/metadata 0.36.3 → 0.36.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.
@@ -210,8 +210,8 @@ const buildResponse = res => {
210
210
  };
211
211
 
212
212
  class SequenceMetadataClient extends Metadata {
213
- constructor(hostname) {
214
- super(hostname, fetch__default["default"]);
213
+ constructor(hostname = 'https://metadata.sequence.app') {
214
+ super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch__default["default"]);
215
215
  }
216
216
 
217
217
  }
@@ -210,8 +210,8 @@ const buildResponse = res => {
210
210
  };
211
211
 
212
212
  class SequenceMetadataClient extends Metadata {
213
- constructor(hostname) {
214
- super(hostname, fetch__default["default"]);
213
+ constructor(hostname = 'https://metadata.sequence.app') {
214
+ super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch__default["default"]);
215
215
  }
216
216
 
217
217
  }
@@ -202,8 +202,8 @@ const buildResponse = res => {
202
202
  };
203
203
 
204
204
  class SequenceMetadataClient extends Metadata {
205
- constructor(hostname) {
206
- super(hostname, fetch);
205
+ constructor(hostname = 'https://metadata.sequence.app') {
206
+ super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
207
207
  }
208
208
 
209
209
  }
@@ -1,5 +1,5 @@
1
1
  export * from './metadata.gen';
2
2
  import { Metadata as BaseSequenceMetadata } from './metadata.gen';
3
3
  export declare class SequenceMetadataClient extends BaseSequenceMetadata {
4
- constructor(hostname: string);
4
+ constructor(hostname?: string);
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/metadata",
3
- "version": "0.36.3",
3
+ "version": "0.36.6",
4
4
  "description": "metadata sub-package for Sequence",
5
5
  "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/metadata",
6
6
  "source": "src/index.ts",
package/src/index.ts CHANGED
@@ -5,7 +5,7 @@ import fetch from 'cross-fetch'
5
5
  import { Metadata as BaseSequenceMetadata } from './metadata.gen'
6
6
 
7
7
  export class SequenceMetadataClient extends BaseSequenceMetadata {
8
- constructor(hostname: string) {
9
- super(hostname, fetch)
8
+ constructor(hostname: string = 'https://metadata.sequence.app') {
9
+ super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch)
10
10
  }
11
11
  }