Fix instant payment contact info condition (#352)
Some checks failed
Master / Build (push) Has been cancelled

This commit is contained in:
Ildar Galeev 2024-10-10 00:43:55 +07:00 committed by GitHub
parent b26baa0d23
commit ea5b03fb5d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;