Skip to content

Commit

Permalink
remove email fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
suejung-sentry committed Jan 22, 2025
1 parent 2407564 commit 0f4c975
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,26 +295,5 @@ describe('PaymentMethodForm', () => {

expect(name).toBe('Account Name')
})

it('uses email when all other name fields are missing', () => {
const accountDetailsWithoutBillingName = {
name: undefined,
email: '[email protected]',
subscriptionDetail: {
defaultPaymentMethod: {
billingDetails: {
name: undefined,
},
},
latestInvoice: {
customerName: undefined,
},
},
} as unknown as z.infer<typeof AccountDetailsSchema>

const name = getName(accountDetailsWithoutBillingName)

expect(name).toBe('[email protected]')
})
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ export const getName = (
?.name ||
accountDetails?.subscriptionDetail?.latestInvoice?.customerName ||
accountDetails?.name ||
getEmail(accountDetails) ||
undefined
)
}
Expand Down

0 comments on commit 0f4c975

Please sign in to comment.