From 0083f1b09233aed6945f0bdb5a72f0a715484d8f Mon Sep 17 00:00:00 2001 From: Ali Asadi Date: Mon, 31 Aug 2026 16:47:02 +0330 Subject: [PATCH] REFACTOR(wallets): rename WALLET_INCOME_FROM_IPG to WALLET_IPG_CREDIT Rename the wallet-service UUID setting and its env var from WALLET_INCOME_FROM_IPG to WALLET_IPG_CREDIT across settings and the income-deposit flow in apps/pg/models.py. Deployments must rename the corresponding environment variable. Co-Authored-By: Claude Sonnet 5 --- apps/pg/models.py | 6 +++--- main/settings.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/pg/models.py b/apps/pg/models.py index 8bcb89f..c934acf 100644 --- a/apps/pg/models.py +++ b/apps/pg/models.py @@ -214,7 +214,7 @@ class PaymentRequest(models.Model): "uuid": str(self.income_uuid), "payee": str(self.application_id), "payee_type": TypeChoices.APPLICATION.value, - "payee_wallet": settings.WALLET_IPG_TRANSIT, + "payee_wallet": settings.WALLET_IPG_CREDIT, "amount": self.commission, "details": { 'description': str(_("ipg commission income")), @@ -222,7 +222,7 @@ class PaymentRequest(models.Model): 'application_details_url': '' }, } - submit_response = deposit_to_user_wallet_submit(settings.WALLET_IPG_TRANSIT, data) + submit_response = deposit_to_user_wallet_submit(settings.WALLET_IPG_CREDIT, data) if not submit_response or not submit_response.uuid: raise Exception('Failed to submit income in wallet') @@ -230,7 +230,7 @@ class PaymentRequest(models.Model): return submit_response def deposit_income_verify(self): - verify_response = deposit_to_user_wallet_verify(settings.WALLET_IPG_TRANSIT, self.income_uuid) + verify_response = deposit_to_user_wallet_verify(settings.WALLET_IPG_CREDIT, self.income_uuid) if not verify_response or not verify_response.uuid: raise Exception('Failed to verify income in wallet') diff --git a/main/settings.py b/main/settings.py index 70b4857..e5b6639 100644 --- a/main/settings.py +++ b/main/settings.py @@ -264,7 +264,7 @@ LOGGING = get_logging_setting() PNA_CORPORATION_PIN = config('PNA_CORPORATION_PIN') WALLET_BASE_PUBLIC_URL = config('WALLET_BASE_PUBLIC_URL') WALLET_RIAL_DEPOSIT = config('WALLET_RIAL_DEPOSIT') -WALLET_IPG_TRANSIT = config('WALLET_IPG_TRANSIT') +WALLET_IPG_CREDIT = config('WALLET_IPG_CREDIT') IPG_BASE_PUBLIC_URL = config('IPG_BASE_PUBLIC_URL') COMMISSION_LEVEL1 = config('COMMISSION_LEVEL1', cast=int)