-
-
-
Account details
- {(() => {
- const rows = [
- ...(cbu
- ? [{ key: 'cbu', label: 'CBU', value: cbu, allowCopy: true, hideBottomBorder: false }]
- : []),
- ...(alias ? [{ key: 'alias', label: 'Alias', value: alias, hideBottomBorder: false }] : []),
- ...(depositAddress
- ? [{ key: 'deposit', label: 'Deposit Address', value: depositAddress, hideBottomBorder: false }]
- : []),
- ...(pixKey ? [{ key: 'pix', label: 'Pix Key', value: pixKey, hideBottomBorder: false }] : []),
- ]
- if (rows.length) {
- rows[rows.length - 1].hideBottomBorder = true
- }
- return
- })()}
-
- )
-}
-
-export default MantecaDepositCard
diff --git a/src/components/AddMoney/components/MantecaDepositShareDetails.tsx b/src/components/AddMoney/components/MantecaDepositShareDetails.tsx
new file mode 100644
index 000000000..c2be8c585
--- /dev/null
+++ b/src/components/AddMoney/components/MantecaDepositShareDetails.tsx
@@ -0,0 +1,132 @@
+'use client'
+
+import NavHeader from '@/components/Global/NavHeader'
+import { useParams, useRouter } from 'next/navigation'
+import React, { useMemo } from 'react'
+import { countryData } from '@/components/AddMoney/consts'
+import ShareButton from '@/components/Global/ShareButton'
+import { MantecaDepositResponseData } from '@/types/manteca.types'
+import { PaymentInfoRow } from '@/components/Payment/PaymentInfoRow'
+import { Icon } from '@/components/Global/Icons/Icon'
+import Image from 'next/image'
+import { Card } from '@/components/0_Bruddle/Card'
+
+const MantecaDepositShareDetails = ({
+ depositDetails,
+ source,
+}: {
+ depositDetails: MantecaDepositResponseData
+ source: 'bank' | 'regionalMethod'
+}) => {
+ const router = useRouter()
+ const params = useParams()
+ const currentCountryName = params.country as string
+
+ const currentCountryDetails = useMemo(() => {
+ // check if we have country params (from dynamic route)
+ if (currentCountryName) {
+ return countryData.find(
+ (country) => country.type === 'country' && country.path === currentCountryName.toLowerCase()
+ )
+ }
+ // Default to Argentina
+ return countryData.find((c) => c.id === 'AR')
+ }, [currentCountryName])
+
+ const countryCodeForFlag = useMemo(() => {
+ const countryId = currentCountryDetails?.id || 'AR'
+ return countryId.toLowerCase()
+ }, [currentCountryDetails])
+
+ const depositAddressLabel = useMemo(() => {
+ switch (currentCountryDetails?.id) {
+ case 'AR':
+ return 'CBU'
+ case 'BR':
+ return 'Pix Key'
+ default:
+ return 'Deposit Address'
+ }
+ }, [currentCountryDetails])
+
+ const depositAddress = depositDetails.details.depositAddress
+ const depositAlias = depositDetails.details.depositAlias
+ const depositAmount = depositDetails.stages['1'].thresholdAmount
+ const usdAmount = depositDetails.stages['3'].amount
+ const currencySymbol = depositDetails.stages['1'].asset
+ const exchangeRate = depositDetails.details.price
+
+ const generateShareText = () => {
+ const textParts = []
+ const currencySymbol = currentCountryDetails?.currency || 'ARS'
+
+ textParts.push(`Amount: ${currencySymbol} ${depositAmount}`)
+
+ if (depositAddress) {
+ textParts.push(`${depositAddressLabel}: ${depositAddress}`)
+ }
+ if (depositAlias) {
+ textParts.push(`Alias: ${depositAlias}`)
+ }
+
+ return textParts.join('\n')
+ }
+
+ return (
+