@riocrypto/common 1.0.1164 → 1.0.1165

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.
@@ -37,7 +37,7 @@ import { InternalSwap } from "../types/internal-swap";
37
37
  import { BridgeExternalAccountQuery } from "../types/bridge-external-account-query";
38
38
  export declare class RioAdminClient {
39
39
  private axios;
40
- constructor(axios: AxiosStatic | AxiosInstance);
40
+ constructor(axios: AxiosStatic | AxiosInstance, isLocal: boolean);
41
41
  getOrders(page: number, limit?: number, query?: OrderQuery): Promise<Order[]>;
42
42
  createQuote(input: QuoteInput): Promise<{
43
43
  quote: Quote;
@@ -11,8 +11,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.RioAdminClient = void 0;
13
13
  class RioAdminClient {
14
- constructor(axios) {
14
+ constructor(axios, isLocal) {
15
15
  this.axios = axios;
16
+ if (isLocal) {
17
+ this.axios.defaults.baseURL = "https://dev.riotransfer.co";
18
+ }
16
19
  axios.interceptors.request.use((config) => {
17
20
  // Exclude specific cookies from being sent
18
21
  if (config.headers && config.headers.Cookie) {
@@ -33,7 +33,7 @@ import { BridgeExternalAccountQuery } from "../types/bridge-external-account-que
33
33
  import { SecurityQuestion } from "../types/security-question";
34
34
  export declare class RioClient {
35
35
  private axios;
36
- constructor(axios: AxiosStatic | AxiosInstance);
36
+ constructor(axios: AxiosStatic | AxiosInstance, isLocal?: boolean);
37
37
  getOrders(page: number, limit?: number, query?: OrderQuery, includeOwnOrders?: boolean): Promise<Order[]>;
38
38
  getChainedOrders(page: number, limit?: number, query?: ChainedOrderQuery): Promise<ChainedOrder[]>;
39
39
  createQuote(input: QuoteInput): Promise<Quote>;
@@ -11,8 +11,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.RioClient = void 0;
13
13
  class RioClient {
14
- constructor(axios) {
14
+ constructor(axios, isLocal) {
15
15
  this.axios = axios;
16
+ if (isLocal) {
17
+ this.axios.defaults.baseURL = "https://dev.riotransfer.co";
18
+ }
16
19
  axios.interceptors.request.use((config) => {
17
20
  // Exclude specific cookie from being sent
18
21
  if (config.headers && config.headers.Cookie) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.1164",
3
+ "version": "1.0.1165",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",