mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-09 10:57:03 +08:00
修复钱包余额变更后的鉴权缓存延迟
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user