mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-21 11:36:05 +00:00
admin: a withdrawal that went through is reported even when the state re-read fails
This commit is contained in:
@@ -53,7 +53,8 @@ export function usePlaceContrib() {
|
||||
setBusy(true);
|
||||
try {
|
||||
const result = await placeContribRepo.withdraw();
|
||||
setState(await placeContribRepo.state());
|
||||
// The withdrawal went through; a failed re-read keeps the old state rather than reporting it failed.
|
||||
await placeContribRepo.state().then(setState, () => undefined);
|
||||
return result;
|
||||
} finally {
|
||||
setBusy(false);
|
||||
|
||||
Reference in New Issue
Block a user