summaryrefslogtreecommitdiff
path: root/packages/demobank-ui/src/context/config.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/demobank-ui/src/context/config.ts')
-rw-r--r--packages/demobank-ui/src/context/config.ts25
1 files changed, 14 insertions, 11 deletions
diff --git a/packages/demobank-ui/src/context/config.ts b/packages/demobank-ui/src/context/config.ts
index 5d8a5c73f..1cabab51c 100644
--- a/packages/demobank-ui/src/context/config.ts
+++ b/packages/demobank-ui/src/context/config.ts
@@ -157,8 +157,8 @@ export class CacheAwareApi extends TalerCoreBankHttpClient {
async deleteAccount(auth: UserAndToken, cid?: string | undefined) {
const resp = await super.deleteAccount(auth, cid);
if (resp.type === "ok") {
- revalidatePublicAccounts();
- revalidateBusinessAccounts();
+ await revalidatePublicAccounts();
+ await revalidateBusinessAccounts();
}
return resp;
}
@@ -168,8 +168,11 @@ export class CacheAwareApi extends TalerCoreBankHttpClient {
) {
const resp = await super.createAccount(auth, body);
if (resp.type === "ok") {
- revalidatePublicAccounts();
- revalidateBusinessAccounts();
+ // admin balance change on new account
+ await revalidateAccountDetails();
+ await revalidateTransactions();
+ await revalidatePublicAccounts();
+ await revalidateBusinessAccounts();
}
return resp;
}
@@ -180,7 +183,7 @@ export class CacheAwareApi extends TalerCoreBankHttpClient {
) {
const resp = await super.updateAccount(auth, body, cid);
if (resp.type === "ok") {
- revalidateAccountDetails();
+ await revalidateAccountDetails();
}
return resp;
}
@@ -191,8 +194,8 @@ export class CacheAwareApi extends TalerCoreBankHttpClient {
) {
const resp = await super.createTransaction(auth, body, cid);
if (resp.type === "ok") {
- revalidateAccountDetails();
- revalidateTransactions();
+ await revalidateAccountDetails();
+ await revalidateTransactions();
}
return resp;
}
@@ -203,8 +206,8 @@ export class CacheAwareApi extends TalerCoreBankHttpClient {
) {
const resp = await super.confirmWithdrawalById(auth, wid, cid);
if (resp.type === "ok") {
- revalidateAccountDetails();
- revalidateTransactions();
+ await revalidateAccountDetails();
+ await revalidateTransactions();
}
return resp;
}
@@ -215,8 +218,8 @@ export class CacheAwareApi extends TalerCoreBankHttpClient {
) {
const resp = await super.createCashout(auth, body, cid);
if (resp.type === "ok") {
- revalidateAccountDetails();
- revalidateCashouts();
+ await revalidateAccountDetails();
+ await revalidateCashouts();
}
return resp;
}