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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/components/TransactionDetails/strategies/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { intentFallback } from './fallback'
export type IntentKind =
| 'DIRECT_TRANSFER'
| 'SEND_LINK'
| 'SEND_LINK_CLAIM'
| 'P2P_REQUEST_FULFILL'
| 'QR_PAY'
| 'CRYPTO_DEPOSIT'
Expand All @@ -39,6 +40,7 @@ const STRATEGIES: Record<IntentKind, TransactionStrategy> = {
DIRECT_TRANSFER: p2pSendOrRequestFulfill,
P2P_REQUEST_FULFILL: p2pSendOrRequestFulfill,
SEND_LINK: sendLink,
SEND_LINK_CLAIM: sendLink,
QR_PAY: qrPay,
CRYPTO_DEPOSIT: cryptoDeposit,
CRYPTO_WITHDRAW: cryptoWithdraw,
Expand Down
13 changes: 8 additions & 5 deletions src/hooks/useHomeCarouselCTAs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ export const useHomeCarouselCTAs = () => {
[latestHistory]
)
const hasSentInvites = (user?.invitesSent?.length ?? 0) > 0
const hasSupportSurvivorBadge = user?.user?.badges?.some((b) => b.code === 'SUPPORT_SURVIVOR') ?? false

const dismissCTA = useCallback(
(ctaId: string) => {
Expand Down Expand Up @@ -261,11 +262,12 @@ export const useHomeCarouselCTAs = () => {
})
}

// Bug bounty — shown to activated users only. Server enforces the real
// eligibility (email verified, ≥1 payment OR KYC approved), lifetime
// caps, and the daily budget. This gate just keeps the CTA off cold
// accounts where the reward would be denied anyway.
if (isActivated) {
// Bug bounty — shown to activated users who haven't already claimed.
// Server enforces lifetime cap of 1 grant per user, so re-pinging the
// CTA after a successful claim would just bounce off `already_granted`.
// Hide once the SUPPORT_SURVIVOR badge is on the user — that's the
// server-side dedup marker, so it's the authoritative signal.
if (isActivated && !hasSupportSurvivorBadge) {
_carouselCTAs.push({
id: 'bug-bounty',
title: (
Expand Down Expand Up @@ -329,6 +331,7 @@ export const useHomeCarouselCTAs = () => {
isActivated,
hasMadeQrPayment,
hasSentInvites,
hasSupportSurvivorBadge,
oneSignalInitialized,
setIsIosPwaInstallModalOpen,
toast,
Expand Down
7 changes: 7 additions & 0 deletions src/hooks/wallet/useGrantSessionKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,14 @@ export const useGrantSessionKey = (): GrantSessionKeyResult => {
// produce a passkey prompt.
posthog.capture(ANALYTICS_EVENTS.CARD_SESSION_KEY_PROMPTED)
// Triggers the passkey prompt — this is the one-time install.
// `address` is forced to the user's actual wallet so the approval
// binds to the deployed kernel. Pre-2025-09-18 users sit at a
// legacy V0_0_2-derived address (migrated in place to V0_0_3); the
// natural counterfactual of `createKernelAccount({sudo: newValidator})`
// is a different, never-funded address. Forcing the address here makes
// the grant work for both legacy and post-migration users.
const sessionKernelAccount = await createKernelAccount(peanutPublicClient, {
address: kernelClient.account!.address,
entryPoint: getEntryPoint('0.7'),
kernelVersion: KERNEL_V3_1,
plugins: {
Expand Down
Loading