Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
9b2cb33
Merge branch 'feat/manteca-integration' into feat/manteca-qr
jjramirezn Sep 1, 2025
1cecd4a
Merge remote-tracking branch 'origin/peanut-wallet-dev' into feat/man…
jjramirezn Sep 2, 2025
6915387
wip: manteca qr payment
jjramirezn Sep 3, 2025
d1ca804
setup component structure
Zishan-7 Sep 3, 2025
9461aae
integrate deposit API
Zishan-7 Sep 4, 2025
7ae1406
Complete API integration and add Brazil support (disabled)
Zishan-7 Sep 4, 2025
13662ab
generate share button text
Zishan-7 Sep 5, 2025
58f66f3
comment unused code
Zishan-7 Sep 5, 2025
bfe4da5
fix: build error
Zishan-7 Sep 5, 2025
fda8345
feat: manteca onboarding widget service
kushagrasarathe Sep 5, 2025
efe9139
feat: useMantecaKyc hook
kushagrasarathe Sep 5, 2025
3afb9af
feat: update manteca deposit flow to handle kyc
kushagrasarathe Sep 5, 2025
781501a
fix: rename useKycFlow to useBridgeKycFlow
kushagrasarathe Sep 5, 2025
31e2c49
Merge branch 'feat/manteca-integration' into feat/manteca-qr
jjramirezn Sep 6, 2025
1b7aad5
feat: pay mercadopago and pix QRs
jjramirezn Sep 8, 2025
6866787
test: use jest-transform-stub for svg, png, jpg, jpeg, gif
jjramirezn Sep 8, 2025
15527d5
Merge branch 'feat/manteca-integration' into feat/manteca-qr
jjramirezn Sep 8, 2025
a3e15c0
fix: add loading state to qr pay
jjramirezn Sep 8, 2025
3de2c83
Merge remote-tracking branch 'origin/feat/manteca-integration' into f…
Zishan-7 Sep 9, 2025
21cc0f9
Remove brazil flow
Zishan-7 Sep 9, 2025
39742c8
fix: improve error handling in MercadoPago component
Zishan-7 Sep 9, 2025
de63db6
use iso2 code for flag
Zishan-7 Sep 9, 2025
ea8bccf
fix: update button disabled state in InputAmountStep and add type for…
Zishan-7 Sep 9, 2025
e3a43f4
Merge pull request #1187 from peanutprotocol/feat/manteca-add-flow
Zishan-7 Sep 9, 2025
19e62b4
add claim to mercado pago UI
Zishan-7 Sep 10, 2025
2a9f311
refactor: replace Card component with MantecaDetailsCard in MantecaDe…
Zishan-7 Sep 10, 2025
a333a54
Add UI for Manteca req fulfilment flow
Zishan-7 Sep 10, 2025
262587f
Merge branch 'peanut-wallet-dev' into feat/manteca-integration
jjramirezn Sep 11, 2025
1e6f3dd
Merge branch 'feat/manteca-integration' into feat/manteca-qr
jjramirezn Sep 11, 2025
4228d45
feat: handle manteca kyc completion flow
kushagrasarathe Sep 11, 2025
d066eb4
feat: handle geo specific kyc for manteca
kushagrasarathe Sep 11, 2025
7effc01
Merge branch 'feat/manteca-add-flow' of https://github.com/peanutprot…
kushagrasarathe Sep 11, 2025
d7e6c0f
Merge branch 'feat/manteca-add-flow' into feat/manteca-kyc
kushagrasarathe Sep 12, 2025
963b87d
feat: handle geo based user verifciation in user settings
kushagrasarathe Sep 12, 2025
823ec91
fix: use useclient in mepa comp
kushagrasarathe Sep 12, 2025
ad7602a
Integrate request fulfilment API
Zishan-7 Sep 12, 2025
899e5f0
implement claim flow
Zishan-7 Sep 12, 2025
7e84b75
refactor: enhance MantecaDepositCard to dynamically manage row visibi…
Zishan-7 Sep 12, 2025
c7e8c4c
refactor: update AvatarWithBadge to use StaticImageData for logo prop…
Zishan-7 Sep 12, 2025
5642079
feat(qr-pay): update qr-pay page
jjramirezn Sep 13, 2025
b6e0026
fix: resolve coderabbit comments
kushagrasarathe Sep 15, 2025
d9b283d
feat(qr-pay): add max amount validation
jjramirezn Sep 15, 2025
22ac554
refactor: rename U$D to USD
jjramirezn Sep 15, 2025
da60e40
refactor(qr-pay): rename isQRPay to isPaymentProcessorQR
jjramirezn Sep 15, 2025
0cdd610
Merge branch 'peanut-wallet-dev' into feat/manteca-integration
jjramirezn Sep 15, 2025
8009ee5
Merge branch 'feat/manteca-integration' into feat/manteca-qr
jjramirezn Sep 15, 2025
4f53108
refactor(currency): use ifs instead of switch for exchange rate
jjramirezn Sep 15, 2025
8b00772
Merge pull request #1190 from peanutprotocol/feat/manteca-qr
jjramirezn Sep 15, 2025
10a4fba
fix: typo and add suggested changes
Zishan-7 Sep 16, 2025
7eb03c6
Merge remote-tracking branch 'origin/feat/manteca-integration' into f…
Zishan-7 Sep 16, 2025
af53312
feat: country row comp
kushagrasarathe Sep 16, 2025
eab8914
feat: handle non-bridge kyc activity ui and states
kushagrasarathe Sep 16, 2025
c32cd1b
feat: handle home and history page entries for kyc
kushagrasarathe Sep 16, 2025
b39e62a
feat: handle retry for manteca
kushagrasarathe Sep 16, 2025
d09105c
chore: remove test comment
kushagrasarathe Sep 16, 2025
52a7b71
Merge branch 'feat/manteca-integration' into feat/manteca-kyc
kushagrasarathe Sep 16, 2025
35a9a66
Merge branch 'feat/manteca-kyc' into feat/kyc-activity
kushagrasarathe Sep 16, 2025
d4226d4
chore: resolve cr comment
kushagrasarathe Sep 16, 2025
2932f75
refactor: Update flow
Zishan-7 Sep 16, 2025
11ed3ec
move manteca APIs to service
Zishan-7 Sep 16, 2025
b71d7db
chore: add 'use client' directive to MantecaFlowManager component
Zishan-7 Sep 16, 2025
d6dd05f
fix: improve error handling and transaction hash validation in Mantec…
Zishan-7 Sep 16, 2025
4a74991
fix: typo
Zishan-7 Sep 16, 2025
1529829
Merge pull request #1201 from peanutprotocol/feat/manteca-claim-request
Zishan-7 Sep 16, 2025
81c4b14
feat: handle manteca qr-pay kyc gating
kushagrasarathe Sep 17, 2025
95deb7a
Merge branch 'feat/manteca-integration' into feat/manteca-kyc
kushagrasarathe Sep 17, 2025
0f90d9d
Merge pull request #1218 from peanutprotocol/feat/kyc-activity
kushagrasarathe Sep 17, 2025
d4267de
Merge pull request #1189 from peanutprotocol/feat/manteca-kyc
kushagrasarathe Sep 17, 2025
7ad0fe0
fix: cr comments
kushagrasarathe Sep 17, 2025
9e952b5
Merge pull request #1225 from peanutprotocol/feat/manteca-qr-kyc
jjramirezn Sep 17, 2025
13eb2c6
feat: manteca withdraw
jjramirezn Sep 18, 2025
c945cb4
Merge branch 'feat/manteca-integration' into feat/manteca-withdraw
jjramirezn Sep 18, 2025
5390b7b
feat: use kyc for manteca withdraw
jjramirezn Sep 18, 2025
66782ab
Enable claim to bank in claim flow
Zishan-7 Sep 18, 2025
2d3b6e4
Enable Req fulfilment through bank using manteca
Zishan-7 Sep 18, 2025
73f3e23
fix: kush's leftovers
Zishan-7 Sep 18, 2025
d6ea557
add KYC to links flow
Zishan-7 Sep 18, 2025
1b621cc
refactor: review comments
jjramirezn Sep 18, 2025
2cce14b
Merge pull request #1227 from peanutprotocol/feat/manteca-withdraw
jjramirezn Sep 18, 2025
9f1317f
feat: guest kyc flows integration
Zishan-7 Sep 18, 2025
1600b4e
feat: add validation for cbu/cvu alias
jjramirezn Sep 18, 2025
3aa4a8d
feat: geo-locate methods
Zishan-7 Sep 18, 2025
651ab67
fix: ensure fulfillUsingManteca state resets correctly based on URL step
Zishan-7 Sep 18, 2025
1c55ac6
fix: correct spelling of 'fulfil' to 'fulfill' in relevant components
Zishan-7 Sep 19, 2025
830e2cf
Merge pull request #1229 from peanutprotocol/feat/kyc-integration-links
Zishan-7 Sep 19, 2025
5010e07
Merge branch 'peanut-wallet-dev' into feat/manteca-integration
jjramirezn Sep 19, 2025
db05011
feat(manteca-withdraw): allow refund on case of withdrawal failure
jjramirezn Sep 19, 2025
c583bb9
Merge branch 'peanut-wallet-dev' into feat/manteca-integration
jjramirezn Sep 22, 2025
1a9753d
fix: add fullName to QRPayment
jjramirezn Sep 22, 2025
a33a2bb
Merge branch 'feat/manteca-integration' into feat/manteca-withdraw
jjramirezn Sep 22, 2025
9c6c6de
feat: enable withdraw for brazil and bolivia
jjramirezn Sep 22, 2025
d2ec1b0
feat: allow interoperable qr codes for argentina
jjramirezn Sep 22, 2025
50af8da
Revert "feat(manteca-withdraw): allow refund on case of withdrawal fa…
jjramirezn Sep 23, 2025
4912aaa
refactor: better error messaging for manteca withdraw
jjramirezn Sep 23, 2025
0c3ca7c
docs: documment manteca country config
jjramirezn Sep 23, 2025
e32e14f
Merge pull request #1244 from peanutprotocol/feat/manteca-withdraw
jjramirezn Sep 23, 2025
0a24285
fix(qr-pay): url encode qr code
jjramirezn Sep 23, 2025
2908783
refactor: change currency code to ARS
jjramirezn Sep 23, 2025
9539994
refactor(manteca): lowercase destination address
jjramirezn Sep 23, 2025
07f2796
feat(manteca-deposit): fix manteca deposit
jjramirezn Sep 24, 2025
bac15ab
refactor(depossit): add razon social and cuit for argentina
jjramirezn Sep 24, 2025
a641e15
refactor(manteca-deposit): pr comments
jjramirezn Sep 24, 2025
0bbb40f
Merge pull request #1249 from peanutprotocol/feat/manteca-deposit
jjramirezn Sep 24, 2025
f262b5d
fix(token-amount-input): more aesthetic
jjramirezn Sep 24, 2025
71cb69d
refactor(activity): usd-first history
jjramirezn Sep 24, 2025
f15a3e8
fix(manteca): add min and max withdraw and deposit limits
jjramirezn Sep 24, 2025
6b3c273
fix: back routes in withdraw flow
jjramirezn Sep 24, 2025
8304f63
fix: remove withdraw via crypto
jjramirezn Sep 24, 2025
42cb40c
feat: remember manteca methods
jjramirezn Sep 24, 2025
bd0a783
fix: back button on manteca withdraw
jjramirezn Sep 24, 2025
4463806
fix: better implement QR3 specification
jjramirezn Sep 25, 2025
497c19e
fix: add argentina qr3 regex
jjramirezn Sep 25, 2025
9d790c5
fix: shorten log pix address
jjramirezn Sep 25, 2025
24ce52d
fix: kyc page rerendering unnecessarily
jjramirezn Sep 25, 2025
16d6298
Merge branch 'peanut-wallet-dev' into feat/manteca-integration
jjramirezn Sep 25, 2025
05da7c5
fix: improve redirection after kyc verification
jjramirezn Sep 25, 2025
4dfcb28
fix: add loading state for manteca kyc
jjramirezn Sep 25, 2025
762f98d
Feat: Update exchange rate calculation logic
Zishan-7 Sep 26, 2025
022dc6b
feat: integrate Manteca API for LATAM currency exchange rates
Zishan-7 Sep 26, 2025
2e3a0b5
refactor: rename and separate country code map
jjramirezn Sep 26, 2025
0024f54
Merge branch 'feat/manteca-integration' into feat/remember-manteca-me…
jjramirezn Sep 26, 2025
adc48f5
Merge pull request #1252 from peanutprotocol/feat/remember-manteca-me…
jjramirezn Sep 26, 2025
eb62453
fix: make stop verification button less prominent
jjramirezn Sep 26, 2025
227e5c1
fix: country list improvements
jjramirezn Sep 26, 2025
3a47a2b
fix: wait for the user to be updated on kyc success
jjramirezn Sep 26, 2025
7d2cf63
refactor: remove manteca action not used
jjramirezn Sep 26, 2025
cd4e5ab
feat(manteca): add receipts to all manteca transactions
jjramirezn Sep 27, 2025
914781a
fix: format numbers in payment
jjramirezn Sep 27, 2025
1c3cce6
fix: comma breaking everything
jjramirezn Sep 27, 2025
42240ba
feat: add sound to manteca payments
jjramirezn Sep 27, 2025
500a8df
fix: receipt page padding
jjramirezn Sep 29, 2025
bea193a
Merge branch 'feat/manteca-integration' into feat/manteca-receipts
jjramirezn Sep 29, 2025
0724b07
Merge pull request #1257 from peanutprotocol/feat/manteca-receipts
jjramirezn Sep 29, 2025
f9e8706
fix: history items in mangeca
jjramirezn Sep 29, 2025
39df345
fix: invalidate queries on deposit details step
jjramirezn Sep 29, 2025
82d6860
feat: add receipt title to receipt page
jjramirezn Sep 29, 2025
c86fa6c
fix: dont block when user cancels signing
jjramirezn Sep 29, 2025
e8f4e52
fix: better padding in receipt
jjramirezn Sep 29, 2025
21430cb
fix: ask for country code when pix
jjramirezn Sep 29, 2025
6222d10
fix(qr-pay): disable pay button when amount is 0 or usdAmount is 0
jjramirezn Sep 29, 2025
3327a4d
fix: method icon
jjramirezn Sep 29, 2025
80886ad
fix: clear redirect url after logout
jjramirezn Sep 29, 2025
7927fb1
fix: stop formatting weird the saved accounts in withdraw
jjramirezn Sep 29, 2025
f68f0a8
remove direct API call to bridge and use `getCurrencyPrice`
Zishan-7 Sep 30, 2025
c489193
fix: ensure from -> usd -> to in fetchFromFrankfurter
Zishan-7 Sep 30, 2025
a62f747
fix: not allowed error
jjramirezn Sep 30, 2025
333c745
Merge pull request #1255 from peanutprotocol/feat/add-currencies-exch…
jjramirezn Sep 30, 2025
a1384c0
fix: shorten long display names in history
jjramirezn Sep 30, 2025
fd9d282
refactor: remove alias support
jjramirezn Sep 30, 2025
e0f854d
Merge branch 'peanut-wallet-dev' into feat/manteca-integration
jjramirezn Sep 30, 2025
354dfb9
fix: double activity header
jjramirezn Sep 30, 2025
e897c39
Merge branch 'peanut-wallet-dev' into feat/manteca-integration
jjramirezn Sep 30, 2025
b025fd7
fix: brdige kyc status
jjramirezn Sep 30, 2025
a4a1911
fix: router
jjramirezn Sep 30, 2025
90aed23
Merge branch 'peanut-wallet-dev' into feat/manteca-integration
jjramirezn Sep 30, 2025
0cab990
fix: dont cache currency prices
jjramirezn Sep 30, 2025
85f0df4
refactor: show geo specific kyc modal for manteca
jjramirezn Sep 30, 2025
d9900a0
fix: use nullish coalescing operator for shortenStringLong
jjramirezn Sep 30, 2025
37376c6
fix: truncate amounts
jjramirezn Sep 30, 2025
b4556e8
feat: receipt social preview
jjramirezn Oct 1, 2025
653f8af
fix: store user preferences in localstorage with user id
jjramirezn Oct 1, 2025
5166252
fix: dont center text in user header
jjramirezn Oct 1, 2025
a6685e8
fix: recent method path
jjramirezn Oct 1, 2025
99ce772
Merge branch 'peanut-wallet-dev' into feat/manteca-integration
jjramirezn Oct 1, 2025
f36c404
fix(manteca): better inform amounts in deposit details
jjramirezn Oct 1, 2025
a96715a
fix: shorten long pay transaction names
jjramirezn Oct 1, 2025
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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@
"^@/(.*)$": "<rootDir>/src/$1",
"^wagmi/chains$": "<rootDir>/src/utils/__mocks__/wagmi.ts",
"^@squirrel-labs/peanut-sdk$": "<rootDir>/src/utils/__mocks__/peanut-sdk.ts",
"^next/cache$": "<rootDir>/src/utils/__mocks__/next-cache.ts"
"^next/cache$": "<rootDir>/src/utils/__mocks__/next-cache.ts",
"\\.(svg|png|jpg|jpeg|gif)$": "jest-transform-stub"
},
"setupFilesAfterEnv": [
"<rootDir>/jest.setup.ts"
Expand Down
21 changes: 21 additions & 0 deletions src/app/(mobile-ui)/add-money/[country]/[regional-method]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
'use client'
import MantecaAddMoney from '@/components/AddMoney/components/MantecaAddMoney'
import { CountryData, countryData } from '@/components/AddMoney/consts'
import { MantecaSupportedExchanges } from '@/components/AddMoney/consts'
import { useParams } from 'next/navigation'

export default function AddMoneyRegionalMethodPage() {
const params = useParams()
const country = params.country as string
const method = params['regional-method'] as string

const countryDetails: CountryData | undefined = countryData.find((c) => c.path === country)

if (
MantecaSupportedExchanges[countryDetails?.id as keyof typeof MantecaSupportedExchanges] &&
method === 'manteca'
) {
return <MantecaAddMoney source="regionalMethod" />
}
Comment thread
jjramirezn marked this conversation as resolved.
return null
}
4 changes: 2 additions & 2 deletions src/app/(mobile-ui)/add-money/[country]/bank/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { useOnrampFlow } from '@/context/OnrampFlowContext'
import { useWallet } from '@/hooks/wallet/useWallet'
import { formatAmount } from '@/utils'
import { countryData } from '@/components/AddMoney/consts'
import { InitiateKYCModal } from '@/components/Kyc'
import { BridgeKycStatus } from '@/utils/bridge-accounts.utils'
import { useWebSocket } from '@/hooks/useWebSocket'
import { useAuth } from '@/context/authContext'
Expand All @@ -25,6 +24,7 @@ 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'

type AddStep = 'inputAmount' | 'kyc' | 'loading' | 'collectUserDetails' | 'showDetails'

Expand Down Expand Up @@ -303,7 +303,7 @@ export default function OnrampBankPage() {
if (step === 'kyc') {
return (
<div className="flex flex-col justify-start space-y-8">
<InitiateKYCModal
<InitiateBridgeKYCModal
isOpen={isKycModalOpen}
onClose={handleKycModalClose}
onKycSuccess={handleKycSuccess}
Expand Down
45 changes: 30 additions & 15 deletions src/app/(mobile-ui)/history/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@ 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 { usePathname } from 'next/navigation'
import { isKycStatusItem } from '@/hooks/useKycFlow'
import { isKycStatusItem } from '@/hooks/useBridgeKycFlow'
import React, { useEffect, useMemo, useRef } from 'react'

/**
* displays the user's transaction history with infinite scrolling and date grouping.
*/
const HistoryPage = () => {
const pathname = usePathname()
const loaderRef = useRef<HTMLDivElement>(null)
const { user } = useUserStore()

Expand Down Expand Up @@ -63,17 +61,27 @@ const HistoryPage = () => {
const allEntries = useMemo(() => historyData?.pages.flatMap((page) => page.entries) ?? [], [historyData])

const combinedAndSortedEntries = useMemo(() => {
if (isLoading) {
return []
}
const entries: Array<any> = [...allEntries]

if (
user?.user?.bridgeKycStatus &&
user.user.bridgeKycStatus !== 'not_started' &&
user.user.bridgeKycStartedAt
) {
entries.push({
isKyc: true,
timestamp: user.user.bridgeKycStartedAt,
uuid: 'kyc-status-item',
if (user) {
if (user.user?.bridgeKycStatus && user.user.bridgeKycStatus !== 'not_started') {
entries.push({
isKyc: true,
timestamp: user.user.bridgeKycStartedAt ?? new Date(0).toISOString(),
uuid: 'bridge-kyc-status-item',
bridgeKycStatus: user.user.bridgeKycStatus,
})
}
user.user.kycVerifications?.forEach((verification) => {
entries.push({
isKyc: true,
timestamp: verification.approvedAt ?? new Date(0).toISOString(),
uuid: verification.providerUserId ?? `${verification.provider}-${verification.mantecaGeo}`,
verification,
})
})
}

Expand All @@ -84,7 +92,7 @@ const HistoryPage = () => {
})

return entries
}, [allEntries, user])
}, [allEntries, user, isLoading])

if (isLoading && combinedAndSortedEntries.length === 0) {
return <PeanutLoading />
Expand All @@ -101,7 +109,7 @@ const HistoryPage = () => {
)
}

if (combinedAndSortedEntries.length === 0) {
if (!isLoading && combinedAndSortedEntries.length === 0) {
return (
<div className="flex h-[80dvh] flex-col items-center justify-center">
<NavHeader title={'Activity'} />
Expand Down Expand Up @@ -151,7 +159,14 @@ const HistoryPage = () => {
</div>
)}
{isKycStatusItem(item) ? (
<KycStatusItem position={position} />
<KycStatusItem
position={position}
verification={item.verification}
bridgeKycStatus={item.bridgeKycStatus}
bridgeKycStartedAt={
item.bridgeKycStatus ? user?.user.bridgeKycStartedAt : undefined
}
/>
) : (
(() => {
const { transactionDetails, transactionCardType } =
Expand Down
35 changes: 19 additions & 16 deletions src/app/(mobile-ui)/home/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
} from '@/utils'
import { useDisconnect } from '@reown/appkit/react'
import Link from 'next/link'
import { useEffect, useMemo, useState } from 'react'
import { useEffect, useMemo, useState, useCallback } from 'react'
import { twMerge } from 'tailwind-merge'
import { useAccount } from 'wagmi'
import AddMoneyPromptModal from '@/components/Home/AddMoneyPromptModal'
Expand All @@ -38,6 +38,7 @@ import { PostSignupActionManager } from '@/components/Global/PostSignupActionMan
import { useWithdrawFlow } from '@/context/WithdrawFlowContext'
import { useClaimBankFlow } from '@/context/ClaimBankFlowContext'
import { useDeviceType, DeviceType } from '@/hooks/useGetDeviceType'
import useKycStatus from '@/hooks/useKycStatus'
import HomeBanners from '@/components/Home/HomeBanners'

const BALANCE_WARNING_THRESHOLD = parseInt(process.env.NEXT_PUBLIC_BALANCE_WARNING_THRESHOLD ?? '500')
Expand All @@ -48,15 +49,16 @@ export default function Home() {
const { resetFlow: resetClaimBankFlow } = useClaimBankFlow()
const { resetWithdrawFlow } = useWithdrawFlow()
const { deviceType } = useDeviceType()
const { user } = useUserStore()
const [isBalanceHidden, setIsBalanceHidden] = useState(() => {
const prefs = getUserPreferences()
const prefs = user ? getUserPreferences(user.user.userId) : undefined
return prefs?.balanceHidden ?? false
})
const { isConnected: isWagmiConnected } = useAccount()
const { disconnect: disconnectWagmi } = useDisconnect()

const { isFetchingUser, addAccount } = useAuth()
const { user } = useUserStore()
const { isUserKycApproved } = useKycStatus()
const username = user?.user.username

const [showIOSPWAInstallModal, setShowIOSPWAInstallModal] = useState(false)
Expand All @@ -70,14 +72,19 @@ export default function Home() {
return user.user.fullName
}, [user])

const handleToggleBalanceVisibility = (e: React.MouseEvent<HTMLButtonElement>) => {
e.stopPropagation()
setIsBalanceHidden((prev: boolean) => {
const newValue = !prev
updateUserPreferences({ balanceHidden: newValue })
return newValue
})
}
const handleToggleBalanceVisibility = useCallback(
(e: React.MouseEvent<HTMLButtonElement>) => {
e.stopPropagation()
setIsBalanceHidden((prev: boolean) => {
const newValue = !prev
if (user) {
updateUserPreferences(user.user.userId, { balanceHidden: newValue })
}
return newValue
})
},
[user]
)

const isLoading = isFetchingUser && !username

Expand Down Expand Up @@ -210,11 +217,7 @@ export default function Home() {
<PageContainer>
<div className="h-full w-full space-y-6 p-5">
<div className="flex items-center justify-between gap-2">
<UserHeader
username={username!}
fullName={userFullName}
isVerified={user?.user.bridgeKycStatus === 'approved'}
/>
<UserHeader username={username!} fullName={userFullName} isVerified={isUserKycApproved} />
<SearchUsers />
</div>
<div className="space-y-4">
Expand Down
2 changes: 1 addition & 1 deletion src/app/(mobile-ui)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const publicPathRegex = /^\/(request\/pay|claim|pay\/.+$|support)/

const Layout = ({ children }: { children: React.ReactNode }) => {
const pathName = usePathname()
const router = useRouter()
const { isFetchingUser, user } = useAuth()
const [isReady, setIsReady] = useState(false)
const [hasToken, setHasToken] = useState(false)
Expand All @@ -36,6 +35,7 @@ const Layout = ({ children }: { children: React.ReactNode }) => {
const isHistory = pathName === '/history'
const isSupport = pathName === '/support'
const alignStart = isHome || isHistory || isSupport
const router = useRouter()

useEffect(() => {
// check for JWT token
Expand Down
12 changes: 12 additions & 0 deletions src/app/(mobile-ui)/qr-pay/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { generateMetadata } from '@/app/metadata'
import PageContainer from '@/components/0_Bruddle/PageContainer'
import React from 'react'

export const metadata = generateMetadata({
title: 'QR Payment | Peanut',
description: 'Use Peanut to pay Argentinian MercadoPago and Brazilian Pix QR codes',
})

export default function QRPayLayout({ children }: { children: React.ReactNode }) {
return <PageContainer>{children}</PageContainer>
}
Loading
Loading