@mx-cartographer/experiences 3.7.0-alpha.al11 → 3.7.0-alpha.al13
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.
- package/dist/index.es.js +5 -3
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -9911,7 +9911,7 @@ class Tr {
|
|
|
9911
9911
|
};
|
|
9912
9912
|
getAccounts = async () => this.fetchInstance.get(N.ACCOUNTS).then((e) => e.accounts).catch((e) => e);
|
|
9913
9913
|
getMembers = async () => this.fetchInstance.get(N.MEMBERS).then((e) => e.members).catch((e) => e);
|
|
9914
|
-
getMonthlyAccountBalances = async (e) => this.fetchInstance.get(`${N.ACCOUNTS}/${e.guid}/monthly_account_balances`).then((n) =>
|
|
9914
|
+
getMonthlyAccountBalances = async (e) => this.fetchInstance.get(`${N.ACCOUNTS}/${e.guid}/monthly_account_balances`).then((n) => n).catch((n) => n);
|
|
9915
9915
|
getNetWorthChartData = async () => wr.map((n) => ({ x: this.formatMonth(n.x), y: n.y }));
|
|
9916
9916
|
getNetWorthMonthlyList = async () => wr;
|
|
9917
9917
|
_flattenBalances = (e, n) => [
|
|
@@ -9933,9 +9933,11 @@ class Yu {
|
|
|
9933
9933
|
this.api = new Tr(e, n), await this.loadNetWorth();
|
|
9934
9934
|
};
|
|
9935
9935
|
loadNetWorth = async () => {
|
|
9936
|
-
const e = (n, a) =>
|
|
9936
|
+
const e = (n, a) => [...n, ...a.data.monthly_account_balances];
|
|
9937
9937
|
try {
|
|
9938
|
-
const n = await this.api.getAccounts(),
|
|
9938
|
+
const n = await this.api.getAccounts(), a = n.map((s) => this.api.getMonthlyAccountBalances(s));
|
|
9939
|
+
console.log(a);
|
|
9940
|
+
const r = a.reduce(e, []), i = await this.api.getNetWorthMonthlyList(), o = await this.api.getNetWorthChartData();
|
|
9939
9941
|
V(() => {
|
|
9940
9942
|
this.netWorthData = {
|
|
9941
9943
|
accounts: n,
|