fix: harden bulk wallet balance adjustment

This commit is contained in:
RWDai
2026-09-23 16:29:47 +08:00
parent e25e240d16
commit 30bb0c3130
12 changed files with 370 additions and 35 deletions
@@ -18,6 +18,13 @@ impl AppState {
)>,
GatewayError,
> {
#[cfg(test)]
if self.auth_wallet_adjustment_error_for_tests.as_deref() == Some(wallet_id) {
return Err(GatewayError::Internal(
"injected test wallet adjustment failure".to_string(),
));
}
#[cfg(test)]
if let Some(store) = self.auth_wallet_store.as_ref() {
let mut guard = store.lock().expect("auth wallet store should lock");