fix(wallet): 修复额度耗尽后仍可消费

This commit is contained in:
Entropy.Xu
2026-05-17 11:49:08 +08:00
parent a2f91b4108
commit 1b24e1c22a
17 changed files with 925 additions and 160 deletions

View File

@@ -63,10 +63,7 @@ impl WalletSnapshot {
}
}
pub fn access_decision(&self, is_admin: bool) -> WalletAccessDecision {
if is_admin {
return WalletAccessDecision::allowed(None);
}
pub fn access_decision(&self, _is_admin: bool) -> WalletAccessDecision {
if self.status != WalletStatus::Active {
return WalletAccessDecision::wallet_unavailable(self.balance_snapshot());
}