Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
2a66155
feat: sumsub sdk types and declrations
kushagrasarathe Feb 13, 2026
b7a4141
feat: initiateSumsubKyc server action
kushagrasarathe Feb 13, 2026
0dd89d3
feat: useSumsubKycFlow hook setup using initiateSumsubKyc server action
kushagrasarathe Feb 13, 2026
2c2bf14
feat: handle websocket event receiving for sumsub kyc
kushagrasarathe Feb 13, 2026
27ea649
feat: SumsubKycWrapper component to handle sumsub web sdk intializati…
kushagrasarathe Feb 13, 2026
1fa243f
feat: SumsubKycFlow entry point for sumsub kyc wrapper and pending st…
kushagrasarathe Feb 13, 2026
61bd07e
fix: update verification view ux copy + add region intent type
kushagrasarathe Feb 13, 2026
2d79044
chore: fix formatting
kushagrasarathe Feb 13, 2026
e3c9bd8
feat: add sumsub provider to kyc types and shared status consts
kushagrasarathe Feb 16, 2026
b2b90e1
feat: unified kyc status hook
kushagrasarathe Feb 16, 2026
a3316cc
fix: sumsub flow, regionIntent and levelName resolution
kushagrasarathe Feb 16, 2026
6b8f838
feat: sumsub region routing
kushagrasarathe Feb 16, 2026
3188926
feat: unified kyc status drawer
kushagrasarathe Feb 16, 2026
4fb61d4
feat: sumsub kyc gate for qr payments
kushagrasarathe Feb 16, 2026
6d390ad
feat: update views for sumsub flow
kushagrasarathe Feb 16, 2026
ec0d1e9
chore: remove dead code
kushagrasarathe Feb 16, 2026
22fa6b7
Merge branch 'peanut-wallet-dev' into feat/kyc2.0
kushagrasarathe Feb 16, 2026
d0b2764
chore: format
kushagrasarathe Feb 16, 2026
e9715af
fix: address cr review comments
kushagrasarathe Feb 17, 2026
7297b9b
fix: remove levelName param and use regionIntent
kushagrasarathe Feb 17, 2026
b564cb9
fix: reuse exiting start kyc modal and fix its copy
kushagrasarathe Feb 17, 2026
9bf32ae
fix: new cr comments
kushagrasarathe Feb 17, 2026
a8ddab2
fix: more cr comments xD
kushagrasarathe Feb 17, 2026
9fbb5d8
feat: add UserRail types, rejectType and metadata to kyc verification…
kushagrasarathe Feb 18, 2026
60e9dc9
feat: add action_required status category and human-readable sumsub r…
kushagrasarathe Feb 18, 2026
fe5f07d
feat: scope region unlocking by verification regionIntent, expose act…
kushagrasarathe Feb 18, 2026
ea64d17
feat: handle sumsub_kyc_status_update websocket messages
kushagrasarathe Feb 18, 2026
7ed541a
feat: add bridge tos acceptance flow: tos step component, reminder ca…
kushagrasarathe Feb 18, 2026
235724f
feat: handle bridge tos acceptance
kushagrasarathe Feb 18, 2026
9e996b0
fix: listen to additional sumsub sdk methods
kushagrasarathe Feb 19, 2026
250cea8
feat: listen to user rail websocket events
kushagrasarathe Feb 19, 2026
40d222f
fix: move PeanutDoesntStoreAnyPersonalInformation out to a separate c…
kushagrasarathe Feb 19, 2026
2f892cb
feat: add useRailStatusTracking hook
kushagrasarathe Feb 19, 2026
f58ad8d
fix: update SumsubKycFlow and KycVerificationInProgressModal to handl…
kushagrasarathe Feb 19, 2026
8c64be9
feat: add isTerminalRejection utility and sumsubRejectType to unified…
kushagrasarathe Feb 20, 2026
302df7b
refactor: extract shared rejectlabelslist component and simplify draw…
kushagrasarathe Feb 20, 2026
8e5ab8b
fix: handle kyc status transitions for non-success terminal states
kushagrasarathe Feb 20, 2026
2bc70ba
feat: add status-aware modals for regions verification page
kushagrasarathe Feb 20, 2026
1170822
fix: re-submit verification flow and stop verification button in kyc …
kushagrasarathe Feb 20, 2026
bebaeef
fix: gate terminal rejection logic by provider and log tos retry failure
kushagrasarathe Feb 23, 2026
05029c0
docs: update kyc 2.0 testing guide with all implemented test cases
kushagrasarathe Feb 23, 2026
3c62aef
fix: remove kyc testing guide
kushagrasarathe Feb 23, 2026
4cda4bb
feat: bridge additional document collection UI
kushagrasarathe Feb 24, 2026
91d7b1f
chore: format
kushagrasarathe Feb 24, 2026
bcb698c
fix: address code review findings
kushagrasarathe Feb 24, 2026
10f5ee5
fix: aggregate additional requirements across all rails, guard termin…
kushagrasarathe Feb 24, 2026
1b4a9e7
fix: label copy
kushagrasarathe Feb 24, 2026
3c929c2
Merge pull request #1689 from peanutprotocol/feat/kyc2.0-provider-res…
kushagrasarathe Feb 24, 2026
908e38d
Merge pull request #1683 from peanutprotocol/feat/kyc2.0-error-retry-ui
kushagrasarathe Feb 24, 2026
c214dc2
Merge pull request #1679 from peanutprotocol/feat/kyc2.0
kushagrasarathe Feb 24, 2026
58df746
refactor: unify all KYC flows through Sumsub via useMultiPhaseKycFlow
kushagrasarathe Feb 25, 2026
e8a9769
chore: format
kushagrasarathe Feb 25, 2026
47b2661
fix: skip intermediate modal in bridge ToS flow from home page
kushagrasarathe Feb 25, 2026
9af38d1
🐛 fix: show confirmation modal before KYC and prevent backend record …
kushagrasarathe Feb 25, 2026
fd28c3b
chore: format
kushagrasarathe Feb 25, 2026
753b695
🐛 fix: remove pre-KYC name/email collection — now handled by Sumsub SDK
kushagrasarathe Feb 25, 2026
aedabec
🗑️ chore: delete unused UserDetailsForm component
kushagrasarathe Feb 25, 2026
c463dbe
🐛 fix: bridge ToS persistence + consolidate KYC activity by region
kushagrasarathe Feb 25, 2026
045aed9
chore: format
kushagrasarathe Feb 25, 2026
5767b54
fix: qa bugs
kushagrasarathe Feb 25, 2026
0cba1de
fix: auto close drawer bug + activity drawer ui
kushagrasarathe Feb 25, 2026
4587440
Merge pull request #1690 from peanutprotocol/fix/kyc2.0-bugs
kushagrasarathe Feb 25, 2026
e0f4d20
fix: bride tos stuck issue
kushagrasarathe Feb 26, 2026
58ab99c
Fix PIX key validation failing when pasted with whitespace
jjramirezn Feb 26, 2026
dc44e04
Preserve internal whitespace in EMVCo QR PIX keys
jjramirezn Feb 26, 2026
d324a1e
Merge pull request #1697 from peanutprotocol/fix/clean-input
jjramirezn Feb 26, 2026
54d0aa4
fix: remove email from add bank account flow
kushagrasarathe Feb 26, 2026
35e37b1
feat: handle pending bridge tos using home carousel card
kushagrasarathe Feb 27, 2026
1eb1658
fix: handle retry if user abandons kyc
kushagrasarathe Feb 27, 2026
b26a33c
fix: remove duplicate rails entry in kyc drawer
kushagrasarathe Feb 27, 2026
aca3fb0
fix: stop auto initiate kyc in deposit flow
kushagrasarathe Feb 27, 2026
72d75f0
fix: sumsub sdk unmounting issue
kushagrasarathe Feb 27, 2026
907c878
Merge branch 'main' into chore/sync-131
kushagrasarathe Feb 27, 2026
b582765
Merge pull request #1703 from peanutprotocol/chore/sync-131
Hugo0 Feb 27, 2026
17db99e
fix: resolve cr comment
kushagrasarathe Mar 2, 2026
87b06d9
fix: replace legacy bridgeKycStatus checks with unified isUserKycVeri…
kushagrasarathe Mar 2, 2026
6055b42
fix: use rails-based flags for limits display
kushagrasarathe Mar 2, 2026
48cbe31
fix: check provider rail status before showing regions as unlocked
kushagrasarathe Mar 2, 2026
215d37e
fix: kyc drawer SDK unresponsiveness, status labels, and DRY refactor
kushagrasarathe Mar 2, 2026
e4bdf4f
fix: expand sumsub reject label mappings for user-friendly error mess…
kushagrasarathe Mar 2, 2026
d5c169b
Merge remote-tracking branch 'origin/dev' into fix/kyc2.0-bugs-v2
kushagrasarathe Mar 2, 2026
ac4dacf
chore: format
kushagrasarathe Mar 2, 2026
bfd60c1
fix: incomplete verification drawer ui
kushagrasarathe Mar 2, 2026
b9fc704
fix: add error handling to closeAndStartKyc to prevent stuck mounted …
kushagrasarathe Mar 2, 2026
3cd41fe
Merge pull request #1693 from peanutprotocol/fix/kyc2.0-bugs-v2
kushagrasarathe Mar 2, 2026
e69ca2c
fix: kyc flag
kushagrasarathe Mar 4, 2026
e1fabd4
Merge pull request #1712 from peanutprotocol/fix/kyc-flag
kushagrasarathe Mar 4, 2026
6c9eec7
fix: surface bridge docs requirement and allow additional-docs SDK flow
kushagrasarathe Mar 4, 2026
f3eb36d
fix: improve KYC UI states, copy, and requirement labels
kushagrasarathe Mar 4, 2026
f79bbe2
refactor: replace inline KYC websocket with useKycStatus hook
kushagrasarathe Mar 4, 2026
7dc41e8
fix: refresh user on sumsub KYC websocket status updates
kushagrasarathe Mar 4, 2026
4434323
fix: DRY verification modal unlock items and improve onramp error han…
kushagrasarathe Mar 4, 2026
5c1ee0a
chore: format
kushagrasarathe Mar 4, 2026
c6fe2b9
fix: address CR feedback — freshUser ref, typo, fallback copy
kushagrasarathe Mar 5, 2026
f5756da
Merge pull request #1713 from peanutprotocol/fix/kyc2.0-bugs-v3
kushagrasarathe Mar 5, 2026
6cf5d5b
fix: setup flow bugs - install copy, notification stuck state, PWA loop
jjramirezn Mar 6, 2026
5413e9d
revert: keep automatic PWA open behavior
jjramirezn Mar 7, 2026
5a472c2
fix: formatting
jjramirezn Mar 7, 2026
30cb9fb
Merge pull request #1716 from peanutprotocol/fix/setup-bugs
jjramirezn Mar 7, 2026
d2596b1
fix: kyc ui bugs
kushagrasarathe Mar 10, 2026
6f12e8b
fix: docs link
kushagrasarathe Mar 10, 2026
0a9a10f
Merge pull request #1723 from peanutprotocol/fix/kyc-ui-bugs
kushagrasarathe Mar 10, 2026
0ac8384
fix: sumsub multi level transition bug
kushagrasarathe Mar 11, 2026
0b60c66
Merge pull request #1739 from peanutprotocol/fix/kyc2.0-bugs-v4
kushagrasarathe Mar 11, 2026
68f3d67
fix: show kyc benefits
kushagrasarathe Mar 12, 2026
1026381
fix: review
kushagrasarathe Mar 12, 2026
df80e59
Merge pull request #1743 from peanutprotocol/fix/kyc-benefits
kushagrasarathe Mar 12, 2026
1c2f970
Merge branch 'main' into sync/prod-133
kushagrasarathe Mar 12, 2026
6ddd050
fix: request cta flashing state
kushagrasarathe Mar 12, 2026
4405eb2
Merge pull request #1745 from peanutprotocol/fix/request-cta
kushagrasarathe Mar 12, 2026
55facdf
Merge pull request #1744 from peanutprotocol/sync/prod-133
Hugo0 Mar 13, 2026
31c1d23
fix: update manteca refund activity ui
kushagrasarathe Mar 13, 2026
a43e2b5
Merge pull request #1746 from peanutprotocol/fix/refund-ui
kushagrasarathe Mar 13, 2026
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
181 changes: 40 additions & 141 deletions src/app/(mobile-ui)/add-money/[country]/bank/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,30 @@ import { useOnrampFlow } from '@/context/OnrampFlowContext'
import { useWallet } from '@/hooks/wallet/useWallet'
import { formatAmount } from '@/utils/general.utils'
import { countryData } from '@/components/AddMoney/consts'
import { type BridgeKycStatus } from '@/utils/bridge-accounts.utils'
import { useWebSocket } from '@/hooks/useWebSocket'
import { useAuth } from '@/context/authContext'
import useKycStatus from '@/hooks/useKycStatus'
import { useCreateOnramp } from '@/hooks/useCreateOnramp'
import { useRouter, useParams } from 'next/navigation'
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import { useCallback, useEffect, useMemo, useState } from 'react'
import countryCurrencyMappings, { isNonEuroSepaCountry, isUKCountry } from '@/constants/countryCurrencyMapping'
import { formatUnits } from 'viem'
import PeanutLoading from '@/components/Global/PeanutLoading'
import EmptyState from '@/components/Global/EmptyStates/EmptyState'
import { UserDetailsForm, type UserDetailsFormData } from '@/components/AddMoney/UserDetailsForm'
import { updateUserById } from '@/app/actions/users'
import AddMoneyBankDetails from '@/components/AddMoney/components/AddMoneyBankDetails'
import { getCurrencyConfig, getCurrencySymbol, getMinimumAmount } from '@/utils/bridge.utils'
import { OnrampConfirmationModal } from '@/components/AddMoney/components/OnrampConfirmationModal'
import { InitiateBridgeKYCModal } from '@/components/Kyc/InitiateBridgeKYCModal'
import InfoCard from '@/components/Global/InfoCard'
import { useQueryStates, parseAsString, parseAsStringEnum } from 'nuqs'
import { useLimitsValidation } from '@/features/limits/hooks/useLimitsValidation'
import LimitsWarningCard from '@/features/limits/components/LimitsWarningCard'
import { getLimitsWarningCardProps } from '@/features/limits/utils'
import { useExchangeRate } from '@/hooks/useExchangeRate'
import { useMultiPhaseKycFlow } from '@/hooks/useMultiPhaseKycFlow'
import { SumsubKycModals } from '@/components/Kyc/SumsubKycModals'
import { InitiateKycModal } from '@/components/Kyc/InitiateKycModal'

// Step type for URL state
type BridgeBankStep = 'inputAmount' | 'kyc' | 'collectUserDetails' | 'showDetails'
type BridgeBankStep = 'inputAmount' | 'showDetails'

export default function OnrampBankPage() {
const router = useRouter()
Expand All @@ -43,7 +42,7 @@ export default function OnrampBankPage() {
// Example: /add-money/mexico/bank?step=inputAmount&amount=500
const [urlState, setUrlState] = useQueryStates(
{
step: parseAsStringEnum<BridgeBankStep>(['inputAmount', 'kyc', 'collectUserDetails', 'showDetails']),
step: parseAsStringEnum<BridgeBankStep>(['inputAmount', 'showDetails']),
amount: parseAsString,
},
{ history: 'push' }
Expand All @@ -54,20 +53,23 @@ export default function OnrampBankPage() {

// Local UI state (not URL-appropriate - transient)
const [showWarningModal, setShowWarningModal] = useState<boolean>(false)
const [showKycModal, setShowKycModal] = useState<boolean>(false)
const [isRiskAccepted, setIsRiskAccepted] = useState<boolean>(false)
const [isKycModalOpen, setIsKycModalOpen] = useState(false)
const [liveKycStatus, setLiveKycStatus] = useState<BridgeKycStatus | undefined>(undefined)
const [isUpdatingUser, setIsUpdatingUser] = useState(false)
const [userUpdateError, setUserUpdateError] = useState<string | null>(null)
const [isUserDetailsFormValid, setIsUserDetailsFormValid] = useState(false)

const { setError, error, setOnrampData, onrampData } = useOnrampFlow()
const formRef = useRef<{ handleSubmit: () => void }>(null)

const { balance } = useWallet()
const { user, fetchUser } = useAuth()
const { createOnramp, isLoading: isCreatingOnramp, error: onrampError } = useCreateOnramp()

// inline sumsub kyc flow for bridge bank onramp
// regionIntent is NOT passed here to avoid creating a backend record on mount.
// intent is passed at call time: handleInitiateKyc('STANDARD')
const sumsubFlow = useMultiPhaseKycFlow({
onKycSuccess: () => {
setUrlState({ step: 'inputAmount' })
},
})

const selectedCountryPath = params.country as string

const selectedCountry = useMemo(() => {
Expand All @@ -87,19 +89,7 @@ export default function OnrampBankPage() {
// uk-specific check
const isUK = isUKCountry(selectedCountryPath)

useWebSocket({
username: user?.user.username ?? undefined,
autoConnect: !!user?.user.username,
onKycStatusUpdate: (newStatus) => {
setLiveKycStatus(newStatus as BridgeKycStatus)
},
})

useEffect(() => {
if (user?.user.bridgeKycStatus) {
setLiveKycStatus(user.user.bridgeKycStatus as BridgeKycStatus)
}
}, [user?.user.bridgeKycStatus])
const { isUserKycApproved } = useKycStatus()

useEffect(() => {
fetchUser()
Expand Down Expand Up @@ -150,30 +140,12 @@ export default function OnrampBankPage() {
currency: 'USD',
})

// Determine initial step based on KYC status (only when URL has no step)
// Default to inputAmount step when no step in URL
useEffect(() => {
// If URL already has a step, respect it (allows deep linking)
if (urlState.step) return

// Wait for user to be fetched before determining initial step
if (user === null) return

const currentKycStatus = liveKycStatus || user?.user.bridgeKycStatus
const isUserKycVerified = currentKycStatus === 'approved'

if (!isUserKycVerified) {
setUrlState({ step: 'collectUserDetails' })
} else {
setUrlState({ step: 'inputAmount' })
}
}, [liveKycStatus, user, urlState.step, setUrlState])

// Handle KYC completion
useEffect(() => {
if (urlState.step === 'kyc' && liveKycStatus === 'approved') {
setUrlState({ step: 'inputAmount' })
}
}, [liveKycStatus, urlState.step, setUrlState])
setUrlState({ step: 'inputAmount' })
}, [user, urlState.step, setUrlState])

const validateAmount = useCallback(
(amountStr: string): boolean => {
Expand Down Expand Up @@ -215,9 +187,14 @@ export default function OnrampBankPage() {
}, [rawTokenAmount, validateAmount, setError])

const handleAmountContinue = () => {
if (validateAmount(rawTokenAmount)) {
setShowWarningModal(true)
if (!validateAmount(rawTokenAmount)) return

if (!isUserKycApproved) {
setShowKycModal(true)
return
}

setShowWarningModal(true)
}

const handleWarningConfirm = async () => {
Expand Down Expand Up @@ -261,39 +238,6 @@ export default function OnrampBankPage() {
setIsRiskAccepted(false)
}

const handleKycSuccess = () => {
setIsKycModalOpen(false)
setUrlState({ step: 'inputAmount' })
}

const handleKycModalClose = () => {
setIsKycModalOpen(false)
}

const handleUserDetailsSubmit = async (data: UserDetailsFormData) => {
setIsUpdatingUser(true)
setUserUpdateError(null)
try {
if (!user?.user.userId) throw new Error('User not found')
const result = await updateUserById({
userId: user.user.userId,
fullName: data.fullName,
email: data.email,
})
if (result.error) {
throw new Error(result.error)
}
await fetchUser()
setUrlState({ step: 'kyc' })
} catch (error: any) {
setUserUpdateError(error.message)
return { error: error.message }
} finally {
setIsUpdatingUser(false)
}
return {}
}

const handleBack = () => {
if (selectedCountry) {
router.push(`/add-money/${selectedCountry.path}`)
Expand All @@ -302,20 +246,6 @@ export default function OnrampBankPage() {
}
}

const initialUserDetails: Partial<UserDetailsFormData> = useMemo(
() => ({
fullName: user?.user.fullName ?? '',
email: user?.user.email ?? '',
}),
[user?.user.fullName, user?.user.email]
)

useEffect(() => {
if (urlState.step === 'kyc') {
setIsKycModalOpen(true)
}
}, [urlState.step])

// Redirect to inputAmount if showDetails is accessed without required data (deep link / back navigation)
useEffect(() => {
if (urlState.step === 'showDetails' && !onrampData?.transferId) {
Expand All @@ -342,49 +272,6 @@ export default function OnrampBankPage() {
return <PeanutLoading />
}

if (urlState.step === 'collectUserDetails') {
return (
<div className="flex flex-col justify-start space-y-8">
<NavHeader onPrev={handleBack} title="Identity Verification" />
<div className="flex flex-grow flex-col justify-center space-y-4">
<h3 className="text-sm font-bold">Verify your details</h3>
<UserDetailsForm
ref={formRef}
onSubmit={handleUserDetailsSubmit}
isSubmitting={isUpdatingUser}
onValidChange={setIsUserDetailsFormValid}
initialData={initialUserDetails}
/>
<Button
onClick={() => formRef.current?.handleSubmit()}
loading={isUpdatingUser}
variant="purple"
shadowSize="4"
className="w-full"
disabled={!isUserDetailsFormValid || isUpdatingUser}
>
Continue
</Button>
{userUpdateError && <ErrorAlert description={userUpdateError} />}
</div>
</div>
)
}

if (urlState.step === 'kyc') {
return (
<div className="flex flex-col justify-start space-y-8">
<InitiateBridgeKYCModal
isOpen={isKycModalOpen}
onClose={handleKycModalClose}
onKycSuccess={handleKycSuccess}
onManualClose={() => router.push(`/add-money/${selectedCountry.path}`)}
flow="add"
/>
</div>
)
}

if (urlState.step === 'showDetails') {
// Show loading while useEffect redirects if data is missing
if (!onrampData?.transferId) {
Expand Down Expand Up @@ -477,6 +364,18 @@ export default function OnrampBankPage() {
amount={rawTokenAmount}
currency={getCurrencySymbol(getCurrencyConfig(selectedCountry.id, 'onramp').currency)}
/>

<InitiateKycModal
visible={showKycModal}
onClose={() => setShowKycModal(false)}
onVerify={async () => {
await sumsubFlow.handleInitiateKyc('STANDARD')
setShowKycModal(false)
}}
isLoading={sumsubFlow.isLoading}
/>

<SumsubKycModals flow={sumsubFlow} autoStartSdk />
</div>
)
}
Expand Down
36 changes: 11 additions & 25 deletions src/app/(mobile-ui)/history/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import { useTransactionHistory } from '@/hooks/useTransactionHistory'
import { useUserStore } from '@/redux/hooks'
import { formatGroupHeaderDate, getDateGroup, getDateGroupKey } from '@/utils/dateGrouping.utils'
import * as Sentry from '@sentry/nextjs'
import { isKycStatusItem } from '@/hooks/useBridgeKycFlow'
import { isKycStatusItem } from '@/components/Kyc/KycStatusItem'
import { groupKycByRegion } from '@/utils/kyc-grouping.utils'
import { useAuth } from '@/context/authContext'
import { BadgeStatusItem } from '@/components/Badges/BadgeStatusItem'
import { isBadgeHistoryItem } from '@/components/Badges/badge.types'
Expand Down Expand Up @@ -140,6 +141,10 @@ const HistoryPage = () => {
console.log('KYC status updated via WebSocket:', newStatus)
await fetchUser()
},
onSumsubKycStatusUpdate: async (newStatus: string) => {
console.log('Sumsub KYC status updated via WebSocket:', newStatus)
await fetchUser()
},
})

const allEntries = useMemo(() => historyData?.pages.flatMap((page) => page.entries) ?? [], [historyData])
Expand All @@ -165,30 +170,10 @@ const HistoryPage = () => {
})
})

if (user) {
if (user.user?.bridgeKycStatus && user.user.bridgeKycStatus !== 'not_started') {
// Use appropriate timestamp based on KYC status
const bridgeKycTimestamp = (() => {
const status = user.user.bridgeKycStatus
if (status === 'approved') return user.user.bridgeKycApprovedAt
if (status === 'rejected') return user.user.bridgeKycRejectedAt
return user.user.bridgeKycStartedAt
})()
entries.push({
isKyc: true,
timestamp: bridgeKycTimestamp ?? user.user.createdAt ?? new Date().toISOString(),
uuid: 'bridge-kyc-status-item',
bridgeKycStatus: user.user.bridgeKycStatus,
})
}
user.user.kycVerifications?.forEach((verification) => {
entries.push({
isKyc: true,
timestamp: verification.approvedAt ?? verification.updatedAt ?? verification.createdAt,
uuid: verification.providerUserId ?? `${verification.provider}-${verification.mantecaGeo}`,
verification,
})
})
// add one kyc entry per region (STANDARD, LATAM)
if (user?.user) {
const regionEntries = groupKycByRegion(user.user)
entries.push(...regionEntries)
}

entries.sort((a, b) => {
Expand Down Expand Up @@ -272,6 +257,7 @@ const HistoryPage = () => {
bridgeKycStartedAt={
item.bridgeKycStatus ? user?.user.bridgeKycStartedAt : undefined
}
region={item.region}
/>
) : isBadgeHistoryItem(item) ? (
<BadgeStatusItem position={position} entry={item} />
Expand Down
4 changes: 2 additions & 2 deletions src/app/(mobile-ui)/home/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { UserHeader } from '@/components/UserHeader'
import { useAuth } from '@/context/authContext'
import { useWallet } from '@/hooks/wallet/useWallet'
import { useUserStore } from '@/redux/hooks'
import { formatExtendedNumber, getUserPreferences, updateUserPreferences, getRedirectUrl } from '@/utils/general.utils'
import { formatExtendedNumber, getUserPreferences, updateUserPreferences } from '@/utils/general.utils'
import { printableUsdc } from '@/utils/balance.utils'
import { useDisconnect } from '@reown/appkit/react'
import Link from 'next/link'
Expand All @@ -24,7 +24,7 @@ import { PEANUT_WALLET_TOKEN_DECIMALS } from '@/constants/zerodev.consts'
import { PostSignupActionManager } from '@/components/Global/PostSignupActionManager'
import { useWithdrawFlow } from '@/context/WithdrawFlowContext'
import { useClaimBankFlow } from '@/context/ClaimBankFlowContext'
import { useDeviceType, DeviceType } from '@/hooks/useGetDeviceType'
import { useDeviceType } from '@/hooks/useGetDeviceType'
import { useNotifications } from '@/hooks/useNotifications'
import useKycStatus from '@/hooks/useKycStatus'
import { useCardPioneerInfo } from '@/hooks/useCardPioneerInfo'
Expand Down
2 changes: 1 addition & 1 deletion src/app/(mobile-ui)/points/invites/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const InvitesPage = () => {
{invites?.invitees?.map((invite: PointsInvite, i: number) => {
const username = invite.username
const fullName = invite.fullName
const isVerified = invite.kycStatus === 'approved'
const isVerified = invite.kycVerified
const pointsEarned = invite.contributedPoints ?? 0
// respect user's showFullName preference for avatar and display name
const displayName = invite.showFullName && fullName ? fullName : username
Expand Down
2 changes: 1 addition & 1 deletion src/app/(mobile-ui)/points/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ const PointsPage = () => {
{invites.invitees?.slice(0, 5).map((invite: PointsInvite, i: number) => {
const username = invite.username
const fullName = invite.fullName
const isVerified = invite.kycStatus === 'approved'
const isVerified = invite.kycVerified
const pointsEarned = invite.contributedPoints ?? 0
// respect user's showFullName preference for avatar and display name
const displayName = invite.showFullName && fullName ? fullName : username
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading