@zeniai/client-epic-state 4.10.93 → 4.10.95

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.
@@ -58,10 +58,14 @@ const getToastNotificationFromIdentifier = (payload) => {
58
58
  const toastConfig = exports.toastNotificationMapper[toastIdentifier];
59
59
  const variables = toastConfig.variables.map((variableName) => {
60
60
  var _a;
61
- const variableValue = (_a = payload.variables.find((variable) => variable.variableName === variableName)) === null || _a === void 0 ? void 0 : _a.variableValue;
61
+ let variableValue = (_a = payload.variables.find((variable) => variable.variableName === variableName)) === null || _a === void 0 ? void 0 : _a.variableValue;
62
+ variableValue = variableValue !== null && variableValue !== void 0 ? variableValue : '';
63
+ if (variableValue.length > 28) {
64
+ variableValue = `${variableValue.substring(0, 28)}...`;
65
+ }
62
66
  return {
63
67
  variableName,
64
- variableValue: variableValue !== null && variableValue !== void 0 ? variableValue : '',
68
+ variableValue,
65
69
  };
66
70
  });
67
71
  return {
@@ -28,9 +28,9 @@ export interface CreditAccount extends FetchStateAndError {
28
28
  status: CreditAccountStatusType;
29
29
  available: Amount;
30
30
  balance: Amount;
31
- cashback: Amount;
32
31
  hold: Amount;
33
32
  limit: Amount;
33
+ cashback?: Amount;
34
34
  }
35
35
  export declare const initialCreditAcc: CreditAccount;
36
36
  export declare const initialIssueChargeCard: IssueChargeCard;
@@ -18,7 +18,6 @@ export interface CreditAccountPayload {
18
18
  };
19
19
  is_for_charge_cards: boolean;
20
20
  balance_amount: number;
21
- cashback_amount: number;
22
21
  hold_amount: number;
23
22
  available_amount: number;
24
23
  currency_code: string;
@@ -26,6 +25,7 @@ export interface CreditAccountPayload {
26
25
  credit_limit: number;
27
26
  create_time: string;
28
27
  update_time: string;
28
+ cashback_amount?: number | null;
29
29
  }
30
30
  export interface CreditAccountListPayload {
31
31
  credit_accounts: CreditAccountPayload[];
@@ -110,7 +110,9 @@ const toCreditAccount = (payload) => ({
110
110
  status: (0, chargeCardList_1.toCreditAccountStatusType)(payload.status.code),
111
111
  available: (0, amount_1.toAmount)(payload.available_amount, payload.currency_code, payload.currency_symbol),
112
112
  balance: (0, amount_1.toAmount)(payload.balance_amount, payload.currency_code, payload.currency_symbol),
113
- cashback: (0, amount_1.toAmount)(payload.cashback_amount, payload.currency_code, payload.currency_symbol),
113
+ cashback: payload.cashback_amount != null
114
+ ? (0, amount_1.toAmount)(payload.cashback_amount, payload.currency_code, payload.currency_symbol)
115
+ : undefined,
114
116
  hold: (0, amount_1.toAmount)(payload.hold_amount, payload.currency_code, payload.currency_symbol),
115
117
  limit: (0, amount_1.toAmount)(payload.credit_limit, payload.currency_code, payload.currency_symbol),
116
118
  fetchState: 'Completed',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.10.93",
3
+ "version": "4.10.95",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",