修复钱包余额变更后的鉴权缓存延迟

This commit is contained in:
MMEXA
2026-07-06 06:15:31 +08:00
parent b86d4e1f0c
commit c3136126e5
5 changed files with 108 additions and 17 deletions
@@ -87,7 +87,10 @@ impl AppState {
),
created_at_unix_ms: chrono::Utc::now().timestamp().max(0) as u64,
};
return Ok(Some((wallet.clone(), transaction)));
let updated_wallet = wallet.clone();
drop(guard);
self.invalidate_auth_context_cache();
return Ok(Some((updated_wallet, transaction)));
}
Ok(self
@@ -153,7 +156,10 @@ impl AppState {
credited_at_unix_secs: Some(created_at),
expires_at_unix_secs: None,
};
return Ok(Some((wallet.clone(), order)));
let updated_wallet = wallet.clone();
drop(guard);
self.invalidate_auth_context_cache();
return Ok(Some((updated_wallet, order)));
}
let now = chrono::Utc::now();