@riocrypto/common 1.0.668 → 1.0.670

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.
@@ -3,6 +3,6 @@ import { Asset } from "./Asset";
3
3
  export declare class FiatAsset extends Asset {
4
4
  symbol: Fiat;
5
5
  constructor(symbol: Fiat);
6
- getName(): "Brazilian Real" | "United States Dollar" | "Peruvian Sol" | "ERR";
6
+ getName(): "Brazilian Real" | "Mexican Peso" | "United States Dollar" | "Peruvian Sol" | "ERR";
7
7
  getImageUri(): string;
8
8
  }
@@ -15,59 +15,60 @@ class FiatAsset extends Asset_1.Asset {
15
15
  // // return "Bulgarian Lev";
16
16
  if (this.symbol === fiat_1.Fiat.BRL) {
17
17
  return "Brazilian Real";
18
+ // } else if (this.symbol === Fiat.CAD) {
19
+ // return "Canadian Dollar";
20
+ // } else if (this.symbol === Fiat.CHF) {
21
+ // return "Swiss Franc";
22
+ // } else if (this.symbol === Fiat.CLP) {
23
+ // return "Chilean Peso";
24
+ // } else if (this.symbol === Fiat.CNY) {
25
+ // return "Renminbi";
26
+ // } else if (this.symbol === Fiat.CZK) {
27
+ // return "Czech Koruna";
28
+ // } else if (this.symbol === Fiat.DKK) {
29
+ // return "Danish Krone";
30
+ // } else if (this.symbol === Fiat.EUR) {
31
+ // return "Euro";
32
+ // } else if (this.symbol === Fiat.GBP) {
33
+ // return "British Pound";
34
+ // } else if (this.symbol === Fiat.HRK) {
35
+ // return "Croatian Kuna";
36
+ // } else if (this.symbol === Fiat.HUF) {
37
+ // return "Hungarian Forint";
38
+ // } else if (this.symbol === Fiat.IDR) {
39
+ // return "Indonesian Rupiah";
40
+ // } else if (this.symbol === Fiat.ILS) {
41
+ // return "Israeli Shekel";
42
+ // } else if (this.symbol === Fiat.INR) {
43
+ // return "Indian Rupee";
44
+ // } else if (this.symbol === Fiat.JPY) {
45
+ // return "Japanese Yen";
46
+ // } else if (this.symbol === Fiat.KRW) {
47
+ // return "South Korean Won";
48
+ }
49
+ else if (this.symbol === fiat_1.Fiat.MXN) {
50
+ return "Mexican Peso";
51
+ // } else if (this.symbol === Fiat.MYR) {
52
+ // return "Malaysian Ringgit";
53
+ // } else if (this.symbol === Fiat.NOK) {
54
+ // return "Norwegian Krone";
55
+ // } else if (this.symbol === Fiat.NZD) {
56
+ // return "New Zealand Dollar";
57
+ // } else if (this.symbol === Fiat.PHP) {
58
+ // return "Philippine Peso";
59
+ // } else if (this.symbol === Fiat.PLN) {
60
+ // return "Polish Złoty";
61
+ // } else if (this.symbol === Fiat.RON) {
62
+ // return "Swedish Krona";
63
+ // } else if (this.symbol === Fiat.RUB) {
64
+ // return "Russian Ruble";
65
+ // } else if (this.symbol === Fiat.SEK) {
66
+ // return "Swedish Krona";
67
+ // } else if (this.symbol === Fiat.THB) {
68
+ // return "Thai Baht";
69
+ // } else if (this.symbol === Fiat.TRY) {
70
+ // return "Turkish Lira";
18
71
  }
19
- // } else if (this.symbol === Fiat.CAD) {
20
- // return "Canadian Dollar";
21
- // } else if (this.symbol === Fiat.CHF) {
22
- // return "Swiss Franc";
23
- // } else if (this.symbol === Fiat.CLP) {
24
- // return "Chilean Peso";
25
- // } else if (this.symbol === Fiat.CNY) {
26
- // return "Renminbi";
27
- // } else if (this.symbol === Fiat.CZK) {
28
- // return "Czech Koruna";
29
- // } else if (this.symbol === Fiat.DKK) {
30
- // return "Danish Krone";
31
- // } else if (this.symbol === Fiat.EUR) {
32
- // return "Euro";
33
- // } else if (this.symbol === Fiat.GBP) {
34
- // return "British Pound";
35
- // } else if (this.symbol === Fiat.HRK) {
36
- // return "Croatian Kuna";
37
- // } else if (this.symbol === Fiat.HUF) {
38
- // return "Hungarian Forint";
39
- // } else if (this.symbol === Fiat.IDR) {
40
- // return "Indonesian Rupiah";
41
- // } else if (this.symbol === Fiat.ILS) {
42
- // return "Israeli Shekel";
43
- // } else if (this.symbol === Fiat.INR) {
44
- // return "Indian Rupee";
45
- // } else if (this.symbol === Fiat.JPY) {
46
- // return "Japanese Yen";
47
- // } else if (this.symbol === Fiat.KRW) {
48
- // return "South Korean Won";
49
- // } else if (this.symbol === Fiat.MXN) {
50
- // return "Mexican Peso";
51
- // } else if (this.symbol === Fiat.MYR) {
52
- // return "Malaysian Ringgit";
53
- // } else if (this.symbol === Fiat.NOK) {
54
- // return "Norwegian Krone";
55
- // } else if (this.symbol === Fiat.NZD) {
56
- // return "New Zealand Dollar";
57
- // } else if (this.symbol === Fiat.PHP) {
58
- // return "Philippine Peso";
59
- // } else if (this.symbol === Fiat.PLN) {
60
- // return "Polish Złoty";
61
- // } else if (this.symbol === Fiat.RON) {
62
- // return "Swedish Krona";
63
- // } else if (this.symbol === Fiat.RUB) {
64
- // return "Russian Ruble";
65
- // } else if (this.symbol === Fiat.SEK) {
66
- // return "Swedish Krona";
67
- // } else if (this.symbol === Fiat.THB) {
68
- // return "Thai Baht";
69
- // } else if (this.symbol === Fiat.TRY) {
70
- // return "Turkish Lira";
71
72
  if (this.symbol === fiat_1.Fiat.USD) {
72
73
  return "United States Dollar";
73
74
  // } else if (this.symbol === Fiat.VND) {
@@ -0,0 +1,2 @@
1
+ import { KYCStatus } from "../types/kyc-status";
2
+ export declare const humanizeKYCStatus: (status: KYCStatus) => string;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.humanizeKYCStatus = void 0;
4
+ const kyc_status_1 = require("../types/kyc-status");
5
+ const humanizeKYCStatus = (status) => {
6
+ switch (status) {
7
+ case kyc_status_1.KYCStatus.Failed:
8
+ return "Failed";
9
+ case kyc_status_1.KYCStatus.Review:
10
+ return "Review";
11
+ case kyc_status_1.KYCStatus.businessApproved:
12
+ return "Business approved";
13
+ case kyc_status_1.KYCStatus.Passed:
14
+ return "Passed";
15
+ case kyc_status_1.KYCStatus.None:
16
+ return "None";
17
+ default:
18
+ return "Unknown";
19
+ }
20
+ };
21
+ exports.humanizeKYCStatus = humanizeKYCStatus;
@@ -11,7 +11,7 @@ const humanizeOrderStatus = (status) => {
11
11
  case order_status_1.OrderStatus.Processing:
12
12
  return "Processing";
13
13
  case order_status_1.OrderStatus.AwaitingBankPayoutDetails:
14
- return "Awaiting Bank Payout Details";
14
+ return "Awaiting bank payout details";
15
15
  case order_status_1.OrderStatus.DepositRegistered:
16
16
  return "Deposit Registered";
17
17
  case order_status_1.OrderStatus.DepositConfirmed:
package/build/index.d.ts CHANGED
@@ -137,5 +137,6 @@ export * from "./helpers/get-user-from-client-helper";
137
137
  export * from "./helpers/validate-address";
138
138
  export * from "./helpers/round-down-to-two-decimal-places";
139
139
  export * from "./helpers/humanize-order-status";
140
+ export * from "./helpers/humanize-kyc-status";
140
141
  export * from "./clients/rio-client";
141
142
  export * from "./clients/rio-admin-client";
package/build/index.js CHANGED
@@ -153,5 +153,6 @@ __exportStar(require("./helpers/get-user-from-client-helper"), exports);
153
153
  __exportStar(require("./helpers/validate-address"), exports);
154
154
  __exportStar(require("./helpers/round-down-to-two-decimal-places"), exports);
155
155
  __exportStar(require("./helpers/humanize-order-status"), exports);
156
+ __exportStar(require("./helpers/humanize-kyc-status"), exports);
156
157
  __exportStar(require("./clients/rio-client"), exports);
157
158
  __exportStar(require("./clients/rio-admin-client"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.668",
3
+ "version": "1.0.670",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",