diff --git a/sample/src/App.tsx b/sample/src/App.tsx index 246b8a98..916fca03 100644 --- a/sample/src/App.tsx +++ b/sample/src/App.tsx @@ -103,7 +103,7 @@ export type RootStackParamList = { Cart: undefined; CartModal: undefined; Settings: undefined; - BuyNow: {url: string; auth: string}; + BuyNow: {url: string; auth?: string}; }; const Tab = createBottomTabNavigator(); diff --git a/sample/src/components/BuyNowButton.tsx b/sample/src/components/BuyNowButton.tsx index ec94dbb7..f5c2675b 100644 --- a/sample/src/components/BuyNowButton.tsx +++ b/sample/src/components/BuyNowButton.tsx @@ -57,9 +57,6 @@ export function BuyNowButton({ try { const auth = await fetchToken(); - if (!auth) { - throw new Error('Authentication required for this sample app'); - } let checkoutUrl: string; diff --git a/sample/src/screens/BuyNow/types.ts b/sample/src/screens/BuyNow/types.ts index 9e5f569c..30312f15 100644 --- a/sample/src/screens/BuyNow/types.ts +++ b/sample/src/screens/BuyNow/types.ts @@ -1,5 +1,5 @@ export type BuyNowStackParamList = { - Checkout: {url: string, auth: string}; + Checkout: {url: string, auth?: string}; Address: {id: string}; Payment: {id: string}; };