Skip to content

Commit

Permalink
chore: redirect to native /orders screen instead of /settings/purchas…
Browse files Browse the repository at this point in the history
…es (#11049)
  • Loading branch information
oxaudo authored Oct 31, 2024
1 parent 2ed20b3 commit de50c97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/app/Scenes/HomeView/Components/PaymentFailureBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ export const PaymentFailureBanner: React.FC = () => {
tracking.tappedChangePaymentMethod(failedPayments)

const route =
failedPayments.length === 1
? `orders/${failedPayments[0].internalID}/payment/new`
: `settings/purchases`
failedPayments.length === 1 ? `orders/${failedPayments[0].internalID}/payment/new` : `orders`

navigate(route)
}, [failedPayments, tracking])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ describe("PaymentFailureBanner", () => {
expect(text).toBeTruthy()

fireEvent.press(link)
expect(navigate).toHaveBeenCalledWith("settings/purchases")
expect(navigate).toHaveBeenCalledWith("orders")
})

it("does not render the banner when there are no payment failures", () => {
Expand Down

0 comments on commit de50c97

Please sign in to comment.