@zeniai/client-epic-state 4.17.77 → 4.17.79
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.
|
@@ -2,17 +2,22 @@ import { ZeniAPIResponse } from '../../../../responsePayload';
|
|
|
2
2
|
import { AccountHistoryWithBalance } from './treasuryDetailState';
|
|
3
3
|
interface TreasuryDetailPayload {
|
|
4
4
|
treasury_account: {
|
|
5
|
+
available_balance: {
|
|
6
|
+
amount: number;
|
|
7
|
+
currency_code: string;
|
|
8
|
+
currency_symbol: string;
|
|
9
|
+
};
|
|
5
10
|
insured_funds: {
|
|
6
11
|
amount: number;
|
|
7
12
|
currency_code: string;
|
|
8
13
|
currency_symbol: string;
|
|
9
14
|
};
|
|
10
|
-
|
|
11
|
-
total_balance: {
|
|
15
|
+
processing_transactions_balance: {
|
|
12
16
|
amount: number;
|
|
13
17
|
currency_code: string;
|
|
14
18
|
currency_symbol: string;
|
|
15
19
|
};
|
|
20
|
+
thirty_day_percentage_yield: string;
|
|
16
21
|
total_yield: {
|
|
17
22
|
amount: number;
|
|
18
23
|
currency_code: string;
|
|
@@ -116,9 +116,14 @@ const treasuryDetail = (0, toolkit_1.createSlice)({
|
|
|
116
116
|
const { data } = action.payload;
|
|
117
117
|
if (data === null || data === void 0 ? void 0 : data.data) {
|
|
118
118
|
const summary = {
|
|
119
|
-
totalBalance: (0, amount_1.toAmount)(data.data.treasury_account.total_balance.amount, data.data.treasury_account.total_balance.currency_code, data.data.treasury_account.total_balance.currency_symbol),
|
|
120
119
|
insuredFunds: (0, amount_1.toAmount)(data.data.treasury_account.insured_funds.amount, data.data.treasury_account.insured_funds.currency_code, data.data.treasury_account.insured_funds.currency_symbol),
|
|
121
120
|
totalYield: (0, amount_1.toAmount)(data.data.treasury_account.total_yield.amount, data.data.treasury_account.total_yield.currency_code, data.data.treasury_account.total_yield.currency_symbol),
|
|
121
|
+
availableBalance: (0, amount_1.toAmount)(data.data.treasury_account.available_balance.amount, data.data.treasury_account.available_balance.currency_code, data.data.treasury_account.available_balance.currency_symbol),
|
|
122
|
+
processingBalance: (0, amount_1.toAmount)(data.data.treasury_account.processing_transactions_balance.amount, data.data.treasury_account.processing_transactions_balance
|
|
123
|
+
.currency_code, data.data.treasury_account.processing_transactions_balance
|
|
124
|
+
.currency_symbol),
|
|
125
|
+
totalBalance: (0, amount_1.toAmount)(data.data.treasury_account.available_balance.amount +
|
|
126
|
+
data.data.treasury_account.processing_transactions_balance.amount, data.data.treasury_account.available_balance.currency_code, data.data.treasury_account.available_balance.currency_symbol),
|
|
122
127
|
thirtyDayPercentageYield: parseFloat(data.data.treasury_account.thirty_day_percentage_yield),
|
|
123
128
|
};
|
|
124
129
|
draft.accountSummary = summary;
|
|
@@ -21,7 +21,9 @@ export interface TreasuryTransaction {
|
|
|
21
21
|
status: TreasuryTransactionStatus;
|
|
22
22
|
}
|
|
23
23
|
export interface TreasurySummaryWithBalance {
|
|
24
|
+
availableBalance: Amount;
|
|
24
25
|
insuredFunds: Amount;
|
|
26
|
+
processingBalance: Amount;
|
|
25
27
|
thirtyDayPercentageYield: number;
|
|
26
28
|
totalBalance: Amount;
|
|
27
29
|
totalYield: Amount;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.17.
|
|
3
|
+
"version": "4.17.79",
|
|
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",
|