async fn ensure_cash_withdrawal_safety( state: &AppState, wallet: &WalletAddress, amount: Decimal, ) -> Result<(), ApiError>