mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-07 18:07:47 +08:00
fix(admin): classify bulk wallet adjustment failures
This commit is contained in:
@@ -5,6 +5,19 @@ impl AppState {
|
||||
&self,
|
||||
lookup: aether_data::repository::wallet::WalletLookupKey<'_>,
|
||||
) -> Result<Option<aether_data::repository::wallet::StoredWalletSnapshot>, GatewayError> {
|
||||
#[cfg(test)]
|
||||
if let Some(failed_user_id) = self.auth_wallet_lookup_error_for_tests.as_deref() {
|
||||
let lookup_user_id = match &lookup {
|
||||
aether_data::repository::wallet::WalletLookupKey::UserId(user_id) => Some(*user_id),
|
||||
_ => None,
|
||||
};
|
||||
if lookup_user_id == Some(failed_user_id) {
|
||||
return Err(GatewayError::Internal(
|
||||
"injected test wallet lookup failure".to_string(),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
if let Some(store) = self.auth_wallet_store.as_ref() {
|
||||
let wallet = {
|
||||
|
||||
Reference in New Issue
Block a user