react-memory-optimization 0.0.9 → 0.0.10
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,29 +1,21 @@
|
|
|
1
|
-
import { CancelOperationProps, PaymentOperation,
|
|
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
|
-
|
|
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:
|
|
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,
|
|
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
|
});
|