From 803c574796742b8fa82812cd5421a0f24bc8bc61 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_TRANSIT Rename the wallet-service UUID setting and its env var from WALLET_INCOME_FROM_IPG to WALLET_IPG_TRANSIT 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 587f224..8bcb89f 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_INCOME_FROM_IPG, + "payee_wallet": settings.WALLET_IPG_TRANSIT, "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_INCOME_FROM_IPG, data) + submit_response = deposit_to_user_wallet_submit(settings.WALLET_IPG_TRANSIT, 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_INCOME_FROM_IPG, self.income_uuid) + verify_response = deposit_to_user_wallet_verify(settings.WALLET_IPG_TRANSIT, 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 32658e3..70b4857 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_INCOME_FROM_IPG = config('WALLET_INCOME_FROM_IPG') +WALLET_IPG_TRANSIT = config('WALLET_IPG_TRANSIT') IPG_BASE_PUBLIC_URL = config('IPG_BASE_PUBLIC_URL') COMMISSION_LEVEL1 = config('COMMISSION_LEVEL1', cast=int)