@truelab/truelogic 2.0.0-1 → 2.0.0-2

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.
@@ -1,9 +1,13 @@
1
+ export type TStakeData = {
2
+ amount: number;
3
+ level?: number;
4
+ };
1
5
  export type TCashServiceInitConfig = {
2
6
  currency: string;
3
7
  currencyDecimals: number;
4
8
  coinRatio: number;
5
9
  lang: string;
6
- stakeAmount: number;
10
+ stakeData: TStakeData;
7
11
  };
8
12
  export type TFormatCoinsOptions = {
9
13
  showCurrency: boolean;
@@ -16,11 +20,10 @@ export declare class CashService {
16
20
  currencyDecimals: number;
17
21
  lang: string;
18
22
  protected coinRatio: number;
19
- protected stakeAmount: number;
20
23
  protected coinValue: number;
21
24
  protected formatter: Intl.NumberFormat;
22
25
  init(config: TCashServiceInitConfig): void;
23
- setStakeAmount(value: number): void;
26
+ setStakeData({ amount, level }: TStakeData): void;
24
27
  coinsToCash(coins: number): number;
25
28
  formatCoins(coins: number, options?: TFormatCoinsOptions): string;
26
29
  formatCash(cashValue: number, options?: TFormatCoinsOptions): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truelab/truelogic",
3
- "version": "2.0.0-1",
3
+ "version": "2.0.0-2",
4
4
  "description": "",
5
5
  "main": "./dist/truelogic.min.js",
6
6
  "types": "./dist/types/src/truelogic.d.ts",