@riocrypto/common 1.0.1169 → 1.0.1171

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.
@@ -38,6 +38,7 @@ import { BridgeExternalAccountQuery } from "../types/bridge-external-account-que
38
38
  export declare class RioAdminClient {
39
39
  private axios;
40
40
  constructor(axios: AxiosStatic | AxiosInstance);
41
+ getLiquidityAvailable(): Promise<number>;
41
42
  getOrders(page: number, limit?: number, query?: OrderQuery): Promise<Order[]>;
42
43
  createQuote(input: QuoteInput): Promise<{
43
44
  quote: Quote;
@@ -13,9 +13,9 @@ exports.RioAdminClient = void 0;
13
13
  class RioAdminClient {
14
14
  constructor(axios) {
15
15
  this.axios = axios;
16
- console.log("process.env.NEXT_PUBLIC_RUNNING_LOCAL", process.env.NEXT_PUBLIC_RUNNING_LOCAL);
17
16
  if (process.env.NEXT_PUBLIC_RUNNING_LOCAL === "true") {
18
17
  this.axios.defaults.baseURL = "https://dev.riotransfer.co";
18
+ this.axios.defaults.withCredentials = true;
19
19
  }
20
20
  axios.interceptors.request.use((config) => {
21
21
  // Exclude specific cookies from being sent
@@ -27,6 +27,12 @@ class RioAdminClient {
27
27
  return config;
28
28
  });
29
29
  }
30
+ getLiquidityAvailable() {
31
+ return __awaiter(this, void 0, void 0, function* () {
32
+ const { data } = yield this.axios.get(`/api/wallet/rio-balances/usd`, {});
33
+ return data.balance;
34
+ });
35
+ }
30
36
  getOrders(page, limit, query) {
31
37
  return __awaiter(this, void 0, void 0, function* () {
32
38
  const { data } = yield this.axios.get(`/api/orders?`, {
@@ -34,6 +34,7 @@ import { SecurityQuestion } from "../types/security-question";
34
34
  export declare class RioClient {
35
35
  private axios;
36
36
  constructor(axios: AxiosStatic | AxiosInstance);
37
+ getLiquidityAvailable(): Promise<number>;
37
38
  getOrders(page: number, limit?: number, query?: OrderQuery, includeOwnOrders?: boolean): Promise<Order[]>;
38
39
  getChainedOrders(page: number, limit?: number, query?: ChainedOrderQuery): Promise<ChainedOrder[]>;
39
40
  createQuote(input: QuoteInput): Promise<Quote>;
@@ -25,6 +25,12 @@ class RioClient {
25
25
  return config;
26
26
  });
27
27
  }
28
+ getLiquidityAvailable() {
29
+ return __awaiter(this, void 0, void 0, function* () {
30
+ const { data } = yield this.axios.get(`/api/wallet/rio-balances/usd`, {});
31
+ return data.balance;
32
+ });
33
+ }
28
34
  getOrders(page, limit, query, includeOwnOrders) {
29
35
  return __awaiter(this, void 0, void 0, function* () {
30
36
  const { data } = yield this.axios.get(`/api/orders?`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.1169",
3
+ "version": "1.0.1171",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",