@smartico/public-api 0.0.134 → 0.0.136

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartico/public-api",
3
- "version": "0.0.134",
3
+ "version": "0.0.136",
4
4
  "description": "Smartico public API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -12,6 +12,32 @@ class CoreUtils {
12
12
  return avatar_id
13
13
  }
14
14
  }
15
+
16
+ public static currencySymbol(currency: string) {
17
+ return {
18
+ [currency.toUpperCase()]: currency.toUpperCase(),
19
+ USD: "$", // United States Dollar
20
+ EUR: "€", // Euro
21
+ JPY: "¥", // Japanese Yen
22
+ GBP: "£", // British Pound Sterling
23
+ AUD: "A$", // Australian Dollar
24
+ CAD: "C$", // Canadian Dollar
25
+ CHF: "CHF", // Swiss Franc
26
+ CNY: "¥", // Chinese Yuan
27
+ SEK: "kr", // Swedish Krona
28
+ NZD: "NZ$", // New Zealand Dollar
29
+ MXN: "MX$", // Mexican Peso
30
+ SGD: "S$", // Singapore Dollar
31
+ HKD: "HK$", // Hong Kong Dollar
32
+ NOK: "kr", // Norwegian Krone
33
+ KRW: "₩", // South Korean Won
34
+ TRY: "₺", // Turkish Lira
35
+ INR: "₹", // Indian Rupee
36
+ RUB: "₽", // Russian Ruble
37
+ BRL: "R$", // Brazilian Real
38
+ ZAR: "R", // South African Rand
39
+ }[currency.toUpperCase()];
40
+ }
15
41
  }
16
42
 
17
43
  export { CoreUtils }
package/src/IntUtils.ts CHANGED
@@ -53,7 +53,7 @@ class IntUtils {
53
53
 
54
54
  public static isWithinPeriod = (timestamp: number, period: 'today' | 'thisWeek' | 'thisMonth'): boolean => {
55
55
  const now = new Date();
56
- const completedDate = new Date(timestamp * 1000);
56
+ const completedDate = new Date(timestamp);
57
57
 
58
58
  switch(period) {
59
59
  case 'today':
@@ -5,6 +5,8 @@ export interface TournamentPublicMeta {
5
5
  image_url?: string;
6
6
  /** 2nd image */
7
7
  image_url2?: string;
8
+ /** 2nd image for mobile */
9
+ image_url2_mobile?: string;
8
10
  /** Description, html capable */
9
11
  description?: string;
10
12
  /** Short explanation of prize pool */