Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions app/components/AuthProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ interface AuthContextType {
hasActiveSubscription: boolean;
checkingSubscription: boolean;
subscriptionData: SubscriptionData | null;
refreshSubscription: () => Promise<void>;
refreshSubscription: (skipRetries?: boolean) => Promise<void>;
initializeDynamic: () => void;
isDynamicInitialized: boolean;
openAuthModal: () => void;
Expand Down Expand Up @@ -150,7 +150,7 @@ export function AuthProvider({ children }: { children: ReactNode }) {
}
}, []);

const refreshSubscription = async () => {
const refreshSubscription = async (skipRetries = false) => {
const walletAddress = user?.verifiedCredentials?.[0]?.address;
if (walletAddress) {
// Clear any cached subscription data first
Expand All @@ -159,8 +159,8 @@ export function AuthProvider({ children }: { children: ReactNode }) {
// Check immediately
const isActive = await checkSubscription(walletAddress);

// If still not active, retry up to 3 times with increasing delays
if (!isActive) {
// Only retry if not skipping retries (used for payment success page, not manual refresh)
if (!isActive && !skipRetries) {
console.log('[AuthProvider] Subscription not active yet, will retry...');

const retryDelays = [1000, 2000, 3000]; // 1s, 2s, 3s
Expand All @@ -173,6 +173,8 @@ export function AuthProvider({ children }: { children: ReactNode }) {
break;
}
}
} else if (skipRetries) {
console.log('[AuthProvider] Retries skipped (manual refresh)');
}
}
};
Expand Down
8 changes: 8 additions & 0 deletions app/components/MenuDropdowns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,14 @@ export function HelpDropdown({
🎯 Start Guided Tour
</button>
)}
<a
href="mailto:support@monadicdna.com"
className="control-button"
onClick={onClose}
title="Contact support via email"
>
<MessageIcon size={14} /> Email Support
</a>
<a
href="https://recherche.discourse.group/c/public/monadic-dna/30"
target="_blank"
Expand Down
Loading
Loading