show empty balance as soon as we have a reserve
This commit is contained in:
parent
cf3eb52033
commit
87f9e7b1e3
@ -73,6 +73,11 @@ export async function getBalancesInsideTransaction(
|
|||||||
byExchange: {},
|
byExchange: {},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
await tx.iter(Stores.reserves).forEach((r) => {
|
||||||
|
const z = Amounts.getZero(r.currency);
|
||||||
|
addTo(balanceStore, "available", z, r.exchangeBaseUrl);
|
||||||
|
});
|
||||||
|
|
||||||
await tx.iter(Stores.coins).forEach((c) => {
|
await tx.iter(Stores.coins).forEach((c) => {
|
||||||
if (c.suspended) {
|
if (c.suspended) {
|
||||||
return;
|
return;
|
||||||
@ -81,6 +86,7 @@ export async function getBalancesInsideTransaction(
|
|||||||
addTo(balanceStore, "available", c.currentAmount, c.exchangeBaseUrl);
|
addTo(balanceStore, "available", c.currentAmount, c.exchangeBaseUrl);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
await tx.iter(Stores.refreshGroups).forEach((r) => {
|
await tx.iter(Stores.refreshGroups).forEach((r) => {
|
||||||
// Don't count finished refreshes, since the refresh already resulted
|
// Don't count finished refreshes, since the refresh already resulted
|
||||||
// in coins being added to the wallet.
|
// in coins being added to the wallet.
|
||||||
|
Loading…
Reference in New Issue
Block a user