diff options
Diffstat (limited to 'generalresearch/managers/thl/wallet/__init__.py')
| -rw-r--r-- | generalresearch/managers/thl/wallet/__init__.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/generalresearch/managers/thl/wallet/__init__.py b/generalresearch/managers/thl/wallet/__init__.py index 1e80397..fe25a13 100644 --- a/generalresearch/managers/thl/wallet/__init__.py +++ b/generalresearch/managers/thl/wallet/__init__.py @@ -2,6 +2,7 @@ from decimal import Decimal from typing import TYPE_CHECKING, Any from generalresearch.managers.thl.ipinfo import GeoIpInfoManager +from generalresearch.managers.thl.virtual_incentives_api import VirtualIncentivesManager from generalresearch.managers.thl.wallet.approve import ( approve_amt_cashout, approve_paypal_order, @@ -37,6 +38,7 @@ def manage_pending_cashout( order_data: dict[str, Any] | CashMailOrderData | None = None, tango_client: TangoClient | None = None, paypal_client: PayPalPayoutManager | None = None, + virtual_incentives_manager: VirtualIncentivesManager | None = None ) -> UserPayoutEvent: """ Called by a UI actions performed by Todd. This rejects/approves/cancels @@ -83,6 +85,16 @@ def manage_pending_cashout( tango_client=tango_client, ) + elif pe.payout_type == PayoutType.VIRTUAL_INCENTIVES: + assert virtual_incentives_manager is not None + + virtual_incentives_manager.complete_order( + user=user, + payout_event=pe, + user_payout_event_manager=user_payout_event_manager, + ledger_manager=ledger_manager, + ) + elif pe.payout_type == PayoutType.PAYPAL: assert paypal_client is not None |
