@0xsequence/api 0.36.2 → 0.36.5

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.
@@ -357,7 +357,7 @@ const buildResponse = res => {
357
357
 
358
358
  class SequenceAPIClient extends API {
359
359
  constructor(hostname, jwtAuth) {
360
- super(hostname, fetch__default["default"]);
360
+ super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch__default["default"]);
361
361
  this.jwtAuth = jwtAuth;
362
362
 
363
363
  this._fetch = (input, init) => {
@@ -357,7 +357,7 @@ const buildResponse = res => {
357
357
 
358
358
  class SequenceAPIClient extends API {
359
359
  constructor(hostname, jwtAuth) {
360
- super(hostname, fetch__default["default"]);
360
+ super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch__default["default"]);
361
361
  this.jwtAuth = jwtAuth;
362
362
 
363
363
  this._fetch = (input, init) => {
@@ -349,7 +349,7 @@ const buildResponse = res => {
349
349
 
350
350
  class SequenceAPIClient extends API {
351
351
  constructor(hostname, jwtAuth) {
352
- super(hostname, fetch);
352
+ super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
353
353
  this.jwtAuth = jwtAuth;
354
354
 
355
355
  this._fetch = (input, init) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/api",
3
- "version": "0.36.2",
3
+ "version": "0.36.5",
4
4
  "description": "api sub-package for Sequence",
5
5
  "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/api",
6
6
  "source": "src/index.ts",
package/src/index.ts CHANGED
@@ -6,7 +6,7 @@ import { API as BaseSequenceAPI } from './api.gen'
6
6
 
7
7
  export class SequenceAPIClient extends BaseSequenceAPI {
8
8
  constructor(hostname: string, public jwtAuth?: string) {
9
- super(hostname, fetch)
9
+ super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch)
10
10
  this.fetch = this._fetch
11
11
  }
12
12