Skip to content

Commit 327228e

Browse files
committed
fix(yapay): Fix handling buyer phone number on create transaction
1 parent 8a13d7e commit 327228e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/apps/yapay/src/yapay-create-transaction.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ export default async (modBody: AppModuleBody<'create_transaction'>) => {
6363
}
6464

6565
try {
66-
const phone = getPhone(buyer);
66+
const phone = getPhone(buyer.phone);
6767
const phoneContacts: Array<Record<string, any>> = [];
6868
if (phone) {
69-
const phoneNumber = phone.replace(/\D/g, '');
69+
const phoneNumber = phone.replace('+55', '').replace(/\D/g, '');
7070
if (phoneNumber.length === 11) {
7171
phoneContacts.push({
7272
type_contact: 'M',

0 commit comments

Comments
 (0)