react-memory-optimization 0.0.9 → 0.0.11

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.
@@ -811,7 +811,7 @@ exports.binaryDecoderScheme = {
811
811
  },
812
812
  {
813
813
  type: 0 /* EReadModifiedDataType.Usual */,
814
- binary: types_1.EReadDataType.Int,
814
+ binary: types_1.EReadDataType.UnsignedInt,
815
815
  name: 'operationId',
816
816
  },
817
817
  ],
@@ -200,46 +200,47 @@ export declare enum ERequestIds {
200
200
  UpdateUserEmail = 13,
201
201
  FrameLoyaltyBonus = 14,
202
202
  RequestDeposit = 15,
203
- GoogleInrDeposit = 16,
204
- DepositPhonePe = 17,
205
- DepositPayTm = 18,
206
- INRWithdrawImp = 19,
207
- DepositTRC = 20,
208
- DepositERC = 21,
209
- DepositBEP = 22,
210
- DepositQrForm = 23,
211
- WithdrawCoinPay = 24,
212
- GetBillingAddress = 25,
213
- WithdrawRubles = 26,
214
- BKashWithdraw = 27,
215
- CriptoWithdraw = 28,
216
- WithdrawBank = 29,
217
- WithdrawPix = 30,
218
- PixPagsmileWithdraw = 31,
219
- PixBankTransferWithdraw = 32,
220
- WithdrawPapara = 33,
221
- WithdrawAninda = 34,
222
- WithdrawMPayFix = 35,
223
- MPayWithdraw = 36,
224
- WithdrawMonetics = 37,
225
- WithdrawHavaleHera = 38,
226
- WithdrawWellexPay = 39,
227
- MNXWallet = 40,
228
- SaveToFav = 41,
229
- CancelOperation = 42,
230
- ApplyBonusPack = 43,
231
- BuyTickets = 44,
232
- LotteryHistoryTicket = 45,
233
- GetCasinoOperations = 46,
234
- GetDepositOperations = 47,
235
- CasinoTournaments = 48,
236
- ExtraLines = 49,
237
- CashOut = 50,
238
- RequestTickets = 51,
239
- LastWinners = 52,
240
- RequestLotteries = 53,
241
- ReferralWithdraw = 54,
242
- WalletAzn = 55
203
+ AnindaHavaleRequest = 16,
204
+ GoogleInrDeposit = 17,
205
+ DepositPhonePe = 18,
206
+ DepositPayTm = 19,
207
+ INRWithdrawImp = 20,
208
+ DepositTRC = 21,
209
+ DepositERC = 22,
210
+ DepositBEP = 23,
211
+ DepositQrForm = 24,
212
+ WithdrawCoinPay = 25,
213
+ GetBillingAddress = 26,
214
+ WithdrawRubles = 27,
215
+ BKashWithdraw = 28,
216
+ CriptoWithdraw = 29,
217
+ WithdrawBank = 30,
218
+ WithdrawPix = 31,
219
+ PixPagsmileWithdraw = 32,
220
+ PixBankTransferWithdraw = 33,
221
+ WithdrawPapara = 34,
222
+ WithdrawAninda = 35,
223
+ WithdrawMPayFix = 36,
224
+ MPayWithdraw = 37,
225
+ WithdrawMonetics = 38,
226
+ WithdrawHavaleHera = 39,
227
+ WithdrawWellexPay = 40,
228
+ MNXWallet = 41,
229
+ SaveToFav = 42,
230
+ CancelOperation = 43,
231
+ ApplyBonusPack = 44,
232
+ BuyTickets = 45,
233
+ LotteryHistoryTicket = 46,
234
+ GetCasinoOperations = 47,
235
+ GetDepositOperations = 48,
236
+ CasinoTournaments = 49,
237
+ ExtraLines = 50,
238
+ CashOut = 51,
239
+ RequestTickets = 52,
240
+ LastWinners = 53,
241
+ RequestLotteries = 54,
242
+ ReferralWithdraw = 55,
243
+ WalletAzn = 56
243
244
  }
244
245
  export declare enum RegistrationSubType {
245
246
  UpdateUserInfo = 6,
@@ -58,61 +58,62 @@ var ERequestIds;
58
58
  ERequestIds[ERequestIds["FrameLoyaltyBonus"] = 14] = "FrameLoyaltyBonus";
59
59
  // Deposits
60
60
  ERequestIds[ERequestIds["RequestDeposit"] = 15] = "RequestDeposit";
61
+ ERequestIds[ERequestIds["AnindaHavaleRequest"] = 16] = "AnindaHavaleRequest";
61
62
  // Important FOR deeplinks
62
- ERequestIds[ERequestIds["GoogleInrDeposit"] = 16] = "GoogleInrDeposit";
63
- ERequestIds[ERequestIds["DepositPhonePe"] = 17] = "DepositPhonePe";
64
- ERequestIds[ERequestIds["DepositPayTm"] = 18] = "DepositPayTm";
63
+ ERequestIds[ERequestIds["GoogleInrDeposit"] = 17] = "GoogleInrDeposit";
64
+ ERequestIds[ERequestIds["DepositPhonePe"] = 18] = "DepositPhonePe";
65
+ ERequestIds[ERequestIds["DepositPayTm"] = 19] = "DepositPayTm";
65
66
  // withdraw IMPS
66
- ERequestIds[ERequestIds["INRWithdrawImp"] = 19] = "INRWithdrawImp";
67
+ ERequestIds[ERequestIds["INRWithdrawImp"] = 20] = "INRWithdrawImp";
67
68
  // Cripto
68
- ERequestIds[ERequestIds["DepositTRC"] = 20] = "DepositTRC";
69
- ERequestIds[ERequestIds["DepositERC"] = 21] = "DepositERC";
70
- ERequestIds[ERequestIds["DepositBEP"] = 22] = "DepositBEP";
71
- ERequestIds[ERequestIds["DepositQrForm"] = 23] = "DepositQrForm";
72
- ERequestIds[ERequestIds["WithdrawCoinPay"] = 24] = "WithdrawCoinPay";
69
+ ERequestIds[ERequestIds["DepositTRC"] = 21] = "DepositTRC";
70
+ ERequestIds[ERequestIds["DepositERC"] = 22] = "DepositERC";
71
+ ERequestIds[ERequestIds["DepositBEP"] = 23] = "DepositBEP";
72
+ ERequestIds[ERequestIds["DepositQrForm"] = 24] = "DepositQrForm";
73
+ ERequestIds[ERequestIds["WithdrawCoinPay"] = 25] = "WithdrawCoinPay";
73
74
  // Billing
74
- ERequestIds[ERequestIds["GetBillingAddress"] = 25] = "GetBillingAddress";
75
+ ERequestIds[ERequestIds["GetBillingAddress"] = 26] = "GetBillingAddress";
75
76
  // Withdraw
76
- ERequestIds[ERequestIds["WithdrawRubles"] = 26] = "WithdrawRubles";
77
- ERequestIds[ERequestIds["BKashWithdraw"] = 27] = "BKashWithdraw";
78
- ERequestIds[ERequestIds["CriptoWithdraw"] = 28] = "CriptoWithdraw";
79
- ERequestIds[ERequestIds["WithdrawBank"] = 29] = "WithdrawBank";
80
- ERequestIds[ERequestIds["WithdrawPix"] = 30] = "WithdrawPix";
81
- ERequestIds[ERequestIds["PixPagsmileWithdraw"] = 31] = "PixPagsmileWithdraw";
82
- ERequestIds[ERequestIds["PixBankTransferWithdraw"] = 32] = "PixBankTransferWithdraw";
77
+ ERequestIds[ERequestIds["WithdrawRubles"] = 27] = "WithdrawRubles";
78
+ ERequestIds[ERequestIds["BKashWithdraw"] = 28] = "BKashWithdraw";
79
+ ERequestIds[ERequestIds["CriptoWithdraw"] = 29] = "CriptoWithdraw";
80
+ ERequestIds[ERequestIds["WithdrawBank"] = 30] = "WithdrawBank";
81
+ ERequestIds[ERequestIds["WithdrawPix"] = 31] = "WithdrawPix";
82
+ ERequestIds[ERequestIds["PixPagsmileWithdraw"] = 32] = "PixPagsmileWithdraw";
83
+ ERequestIds[ERequestIds["PixBankTransferWithdraw"] = 33] = "PixBankTransferWithdraw";
83
84
  // Widthdray turkish
84
- ERequestIds[ERequestIds["WithdrawPapara"] = 33] = "WithdrawPapara";
85
- ERequestIds[ERequestIds["WithdrawAninda"] = 34] = "WithdrawAninda";
86
- ERequestIds[ERequestIds["WithdrawMPayFix"] = 35] = "WithdrawMPayFix";
87
- ERequestIds[ERequestIds["MPayWithdraw"] = 36] = "MPayWithdraw";
85
+ ERequestIds[ERequestIds["WithdrawPapara"] = 34] = "WithdrawPapara";
86
+ ERequestIds[ERequestIds["WithdrawAninda"] = 35] = "WithdrawAninda";
87
+ ERequestIds[ERequestIds["WithdrawMPayFix"] = 36] = "WithdrawMPayFix";
88
+ ERequestIds[ERequestIds["MPayWithdraw"] = 37] = "MPayWithdraw";
88
89
  // End withdraw turkish
89
90
  // Withdraw Monetics
90
- ERequestIds[ERequestIds["WithdrawMonetics"] = 37] = "WithdrawMonetics";
91
- ERequestIds[ERequestIds["WithdrawHavaleHera"] = 38] = "WithdrawHavaleHera";
91
+ ERequestIds[ERequestIds["WithdrawMonetics"] = 38] = "WithdrawMonetics";
92
+ ERequestIds[ERequestIds["WithdrawHavaleHera"] = 39] = "WithdrawHavaleHera";
92
93
  // Wellex pay
93
- ERequestIds[ERequestIds["WithdrawWellexPay"] = 39] = "WithdrawWellexPay";
94
+ ERequestIds[ERequestIds["WithdrawWellexPay"] = 40] = "WithdrawWellexPay";
94
95
  // MNX
95
- ERequestIds[ERequestIds["MNXWallet"] = 40] = "MNXWallet";
96
+ ERequestIds[ERequestIds["MNXWallet"] = 41] = "MNXWallet";
96
97
  // END
97
98
  // Fav
98
- ERequestIds[ERequestIds["SaveToFav"] = 41] = "SaveToFav";
99
+ ERequestIds[ERequestIds["SaveToFav"] = 42] = "SaveToFav";
99
100
  // operation
100
- ERequestIds[ERequestIds["CancelOperation"] = 42] = "CancelOperation";
101
- ERequestIds[ERequestIds["ApplyBonusPack"] = 43] = "ApplyBonusPack";
101
+ ERequestIds[ERequestIds["CancelOperation"] = 43] = "CancelOperation";
102
+ ERequestIds[ERequestIds["ApplyBonusPack"] = 44] = "ApplyBonusPack";
102
103
  // lotteries
103
- ERequestIds[ERequestIds["BuyTickets"] = 44] = "BuyTickets";
104
- ERequestIds[ERequestIds["LotteryHistoryTicket"] = 45] = "LotteryHistoryTicket";
104
+ ERequestIds[ERequestIds["BuyTickets"] = 45] = "BuyTickets";
105
+ ERequestIds[ERequestIds["LotteryHistoryTicket"] = 46] = "LotteryHistoryTicket";
105
106
  // lib
106
- ERequestIds[ERequestIds["GetCasinoOperations"] = 46] = "GetCasinoOperations";
107
- ERequestIds[ERequestIds["GetDepositOperations"] = 47] = "GetDepositOperations";
108
- ERequestIds[ERequestIds["CasinoTournaments"] = 48] = "CasinoTournaments";
109
- ERequestIds[ERequestIds["ExtraLines"] = 49] = "ExtraLines";
110
- ERequestIds[ERequestIds["CashOut"] = 50] = "CashOut";
111
- ERequestIds[ERequestIds["RequestTickets"] = 51] = "RequestTickets";
112
- ERequestIds[ERequestIds["LastWinners"] = 52] = "LastWinners";
113
- ERequestIds[ERequestIds["RequestLotteries"] = 53] = "RequestLotteries";
114
- ERequestIds[ERequestIds["ReferralWithdraw"] = 54] = "ReferralWithdraw";
115
- ERequestIds[ERequestIds["WalletAzn"] = 55] = "WalletAzn";
107
+ ERequestIds[ERequestIds["GetCasinoOperations"] = 47] = "GetCasinoOperations";
108
+ ERequestIds[ERequestIds["GetDepositOperations"] = 48] = "GetDepositOperations";
109
+ ERequestIds[ERequestIds["CasinoTournaments"] = 49] = "CasinoTournaments";
110
+ ERequestIds[ERequestIds["ExtraLines"] = 50] = "ExtraLines";
111
+ ERequestIds[ERequestIds["CashOut"] = 51] = "CashOut";
112
+ ERequestIds[ERequestIds["RequestTickets"] = 52] = "RequestTickets";
113
+ ERequestIds[ERequestIds["LastWinners"] = 53] = "LastWinners";
114
+ ERequestIds[ERequestIds["RequestLotteries"] = 54] = "RequestLotteries";
115
+ ERequestIds[ERequestIds["ReferralWithdraw"] = 55] = "ReferralWithdraw";
116
+ ERequestIds[ERequestIds["WalletAzn"] = 56] = "WalletAzn";
116
117
  })(ERequestIds || (exports.ERequestIds = ERequestIds = {}));
117
118
  // REGISTRATION SUB ID
118
119
  var RegistrationSubType;
@@ -1,29 +1,21 @@
1
- import { CancelOperationProps, PaymentOperation, EOperationStatus, TransactionFilterType } from '../../types';
1
+ import { CancelOperationProps, PaymentOperation, TransactionFilterType } from '../../types';
2
2
  import { ObservableEntity } from 'service/observableEntity';
3
3
  import { BaseObservableSubscriber, UpdateData } from 'service/observable/type';
4
4
  export declare class Payments extends ObservableEntity<undefined> {
5
- payments: PaymentOperation[];
5
+ _payments: PaymentOperation[];
6
6
  constructor();
7
+ set payments(data: PaymentOperation[]);
8
+ get payments(): PaymentOperation[];
7
9
  isExistPaymentTypes(types: TransactionFilterType[]): boolean;
8
10
  update(): {
9
- data: {
10
- compareKey: string;
11
- amount: number;
12
- completionTimestamp: number;
13
- creationTimestamp: number;
14
- direction: import("../../types").EOperationDirect;
15
- id: number;
16
- status: EOperationStatus;
17
- type: import("../../types").EOperationType;
18
- canBeCanceled?: boolean;
19
- }[];
11
+ data: PaymentOperation[];
20
12
  isArray: boolean;
21
13
  withCompare: boolean;
22
14
  property: string;
23
15
  };
24
16
  cancelOperation(operation: CancelOperationProps): void;
25
17
  setPayments(payments: PaymentOperation[]): void;
26
- updateOperations(d: any): void;
18
+ updateOperations(d: PaymentOperation[]): void;
27
19
  sendUpdateEntity(d: BaseObservableSubscriber & {
28
20
  [key: string]: unknown;
29
21
  }): UpdateData | null;
@@ -58,7 +58,12 @@ const adaptedOperations = (operations) => operations.map((o) => {
58
58
  level: o.tax / 100,
59
59
  };
60
60
  }
61
- return Object.assign(Object.assign(Object.assign({}, o), { isCanceledByUser: Boolean(o.isCanceledByUser), isCancelableByUser: o.isCancelableByUser === 2, creationTimestamp: o.creationTimestamp * 1000, completionTimestamp: o.completionTimestamp * 1000,
61
+ return Object.assign(Object.assign(Object.assign({}, o), { isCanceledByUser: Boolean(o.isCanceledByUser), isCancelableByUser: o.isCancelableByUser === 2,
62
+ // ||
63
+ // (o.direction === EOperationDirect.Withdraw &&
64
+ // o.provider !== BONUS_OPERATION_NUMBER &&
65
+ // o.status === EOperationStatus.Created),
66
+ creationTimestamp: o.creationTimestamp * 1000, completionTimestamp: o.completionTimestamp * 1000,
62
67
  // not important for payments
63
68
  endTimestamp: (o.endTimestamp || o.completionTimestamp) * 1000, amount: o.amount / 100, fee: o.fee / 100, tax: o.tax / 100 }), bonusInfo);
64
69
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-memory-optimization",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "react memory optimization library",
5
5
  "sideEffects": false,
6
6
  "files": [