From ea5b03fb5db41d70668046abef34aaa8e8dac9c5 Mon Sep 17 00:00:00 2001 From: Ildar Galeev Date: Thu, 10 Oct 2024 00:43:55 +0700 Subject: [PATCH] Fix instant payment contact info condition (#352) --- src/common/paymentCondition/initPaymentCondition.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common/paymentCondition/initPaymentCondition.ts b/src/common/paymentCondition/initPaymentCondition.ts index 5bd46ab25..4fb753a41 100644 --- a/src/common/paymentCondition/initPaymentCondition.ts +++ b/src/common/paymentCondition/initPaymentCondition.ts @@ -19,6 +19,12 @@ const isInstantPaymentContactInfoEligible = ( return true; } const { email, phoneNumber } = metadata; + // Metadata contactInfo email and phoneNumber are not required, instant payment is eligible + if (!email && !phoneNumber) { + return true; + } + + console.warn(`isInstantPaymentContactInfoEligible, email: ${email}, phoneNumber: ${phoneNumber}`); const { contactInfo } = initContext; if (email && !isNil(contactInfo.email)) { return true;