update deposit page

This commit is contained in:
Blake Kaufman
2026-07-22 08:48:27 -04:00
parent 3e1d38076c
commit 5ea339f22a
14 changed files with 130 additions and 73 deletions
@@ -282,7 +282,7 @@ export default function DepositQRView({
const address = addressState.generatedAddress || '';
const addressSegments = useMemo(() => {
return (address.match(/.{1,4}/g) || []).map((group, i, all) => (
return (address.match(/.{1,5}/g) || []).map((group, i, all) => (
<Text
key={i}
style={{
@@ -310,7 +310,11 @@ export default function DepositQRView({
})
: t(
`wallet.halfModal.depositQRInstruction_${option}${
option === 'spark' && config.fromStablecoin ? '_dollars' : ''
option === 'spark' && config.fromStablecoin
? '_dollars'
: option === 'spark' && config.fromTokens
? '_tokens'
: ''
}`,
);
@@ -21,6 +21,7 @@ import useHandleBackPressNew from '../../../../hooks/useHandleBackPressNew';
import { Image } from 'expo-image';
import ICONS from '../../../../constants/icons';
import { useAppStatus } from '../../../../../context-store/appStatus';
import { useSparkWallet } from '../../../../../context-store/sparkContext';
import SelectOtherReceiveOptionHalfModal from './halfModalOtherOptions';
import AddFundsFromBankHalfModal from './halfModalBank';
import DepositQRView from './depositQRView';
@@ -45,6 +46,7 @@ export default function HalfModalDepositFunds({
const { t } = useTranslation();
const { backgroundColor, backgroundOffset, textColor } = GetThemeColors();
const { bottomPadding, screenDimensions } = useAppStatus();
const { showTokensInformation } = useSparkWallet();
const { addressesForOption } = useAccumulationAddresses();
// Fix 1: Separate shared values per subview so exit animation can play
@@ -124,7 +126,7 @@ export default function HalfModalDepositFunds({
}));
const restoreOptionsHeight = useCallback(() => {
setContentHeight(Math.round(screenDimensions.height * 0.6));
setContentHeight(Math.round(screenDimensions.height * 0.55));
}, [setContentHeight, screenDimensions]);
const showView = useCallback(
@@ -267,7 +269,7 @@ export default function HalfModalDepositFunds({
{/* On-Chain Bitcoin */}
<TouchableOpacity
style={styles.scanButton}
onPress={() => handleShowQR({ selectedRecieveOption: 'Bitcoin' })}
onPress={() => showView('others')}
>
<View
style={[
@@ -334,39 +336,44 @@ export default function HalfModalDepositFunds({
<ThemeIcon iconName={'ChevronRight'} size={18} />
</TouchableOpacity>
{/* Other Bitcoin */}
<TouchableOpacity
style={styles.scanButton}
onPress={() => showView('others')}
>
<View
style={[
styles.scanIconContainer,
{
backgroundColor:
theme && darkModeType ? backgroundColor : backgroundOffset,
},
]}
{/* Deposit tokens */}
{showTokensInformation && (
<TouchableOpacity
style={styles.scanButton}
onPress={() =>
handleShowQR({
selectedRecieveOption: 'spark',
fromTokens: true,
})
}
>
<ThemeIcon
// colorOverride={COLORS.darkModeText}
size={20}
iconName={'Ellipsis'}
/>
</View>
<View style={styles.scanTextContainer}>
<ThemeText
styles={styles.scanButtonText}
content={t('wallet.halfModal.otherBitcoin')}
/>
<ThemeText
styles={styles.scanButtonSubtext}
content={t('wallet.halfModal.otherBitcoinSubtitle')}
/>
</View>
<View
style={[
styles.scanIconContainer,
{
backgroundColor:
theme && darkModeType
? backgroundColor
: backgroundOffset,
},
]}
>
<ThemeIcon size={20} iconName={'Coins'} />
</View>
<View style={styles.scanTextContainer}>
<ThemeText
styles={styles.scanButtonText}
content={t('wallet.halfModal.depositTokens')}
/>
<ThemeText
styles={styles.scanButtonSubtext}
content={t('wallet.halfModal.tokensDesc')}
/>
</View>
<ThemeIcon iconName={'ChevronRight'} size={18} />
</TouchableOpacity>
<ThemeIcon iconName={'ChevronRight'} size={18} />
</TouchableOpacity>
)}
</ScrollView>
</Animated.View>
@@ -20,6 +20,7 @@ export default function SelectOtherReceiveOptionHalfModal({ onShowQR }) {
<View style={{ flex: 1 }}>
<ScrollView showsVerticalScrollIndicator={false}>
{[
{ id: 'bitcoin', label: 'Bitcoin' },
{ id: 'liquid', label: 'Liquid' },
{ id: 'rootstock', label: 'Rootstock' },
{ id: 'spark', label: 'Spark' },
@@ -27,7 +28,12 @@ export default function SelectOtherReceiveOptionHalfModal({ onShowQR }) {
<ChainRow
key={chain.id}
chain={chain}
onSelectAsset={() => onShowQR({ selectedRecieveOption: chain.id })}
onSelectAsset={() =>
onShowQR({
selectedRecieveOption:
chain.id === 'bitcoin' ? 'Bitcoin' : chain.id,
})
}
theme={theme}
darkModeType={darkModeType}
backgroundColor={backgroundColor}
@@ -49,7 +55,9 @@ function ChainRow({
const { t } = useTranslation();
const subtext =
chain.id === 'liquid'
chain.id === 'bitcoin'
? t('wallet.halfModal.bitcoinDesc')
: chain.id === 'liquid'
? t('wallet.halfModal.liquidDesc')
: chain.id === 'rootstock'
? t('wallet.halfModal.roostockDesc')
@@ -66,30 +74,43 @@ function ChainRow({
styles.chainIconContainer,
{
backgroundColor:
theme && darkModeType ? backgroundColor : COLORS.primary,
chain.id === 'bitcoin'
? theme && darkModeType
? backgroundColor
: COLORS.bitcoinOrange
: theme && darkModeType
? backgroundColor
: COLORS.primary,
},
]}
>
<Image
style={styles.assetIcon}
source={
ICONS[
chain.id === 'liquid'
? 'liquidLogo'
: chain.id === 'spark'
? 'sparkLogoLight'
: 'rootstockLogo'
]
}
contentFit="contain"
/>
{chain.id === 'bitcoin' ? (
<Image
source={ICONS.bitcoinIcon}
style={{ width: 26, height: 26, tintColor: 'white' }}
/>
) : (
<Image
style={styles.assetIcon}
source={
ICONS[
chain.id === 'liquid'
? 'liquidLogo'
: chain.id === 'spark'
? 'sparkLogoLight'
: 'rootstockLogo'
]
}
contentFit="contain"
/>
)}
</View>
<View style={styles.chainTextContainer}>
<ThemeText styles={styles.optionLabel} content={chain.label} />
<ThemeText
styles={styles.chainSubtext}
content={subtext}
CustomNumberOfLines={1}
CustomNumberOfLines={2}
/>
</View>
@@ -79,7 +79,7 @@ export function SendRecieveBTNs({
);
navigateGuarded('CustomHalfModal', {
wantedContent: 'depositFunds',
sliderHight: 0.6,
sliderHight: 0.55,
});
}, [handleSettingsCheck, navigateGuarded, t]);
@@ -93,7 +93,7 @@ export function SendRecieveBTNs({
}
navigateGuarded('CustomHalfModal', {
wantedContent: 'swapFlow',
sliderHight: 0.6,
sliderHight: 0.55,
});
}, [handleSettingsCheck, navigateGuarded, t]);
@@ -82,7 +82,7 @@ export default function InvoiceInfo({
// easy visual validation (mirrors depositQRView).
const addressSegments = useMemo(() => {
const addr = formmateedSparkPaymentInfo.address || '';
return (addr.match(/.{1,4}/g) || []).map((group, i, all) => (
return (addr.match(/.{1,5}/g) || []).map((group, i, all) => (
<Text
key={i}
style={{
@@ -246,7 +246,7 @@ export default function SwapFlowHalfModal({
const HEIGHT_FOR_STEP = useMemo(
() => ({
routeSelection: screenDimensions.height * 0.6,
routeSelection: screenDimensions.height * 0.55,
historyExpanded: screenDimensions.height,
amountInput: 700,
review: 600,
+5 -2
View File
@@ -1042,9 +1042,11 @@
"viewDetails": "Details anzeigen",
"othersOptionTitle": "Netzwerk auswählen",
"stablecoinSelectedTitle": "{{curr}} auf {{chain}}",
"bitcoinDesc": "Bitcoin direkt in Ihre Wallet empfangen",
"liquidDesc": "Empfangen Sie Liquid BTC direkt in Ihrer Wallet.",
"roostockDesc": "Empfangen Sie Rootstock BTC direkt in Ihrer Wallet.",
"sparkDesc": "Empfangen Sie BTC oder Token direkt in Ihrer Wallet.",
"sparkDesc": "BTC in Ihre Wallet empfangen.",
"tokensDesc": "Token in Ihre Wallet empfangen.",
"chooseMethodTitle": "Empfangsmethode wählen",
"selectMethodTitle": "Einzahlungsmethode auswählen",
"copyAddress": "Adresse kopieren",
@@ -1055,8 +1057,9 @@
"depositQRInstruction_bitcoin": "Senden Sie nur Bitcoin an diese Adresse. Das Geld kommt nach drei On-Chain-Bestätigungen an.",
"depositQRInstruction_liquid": "Senden Sie nur Liquid Bitcoin an diese Adresse. Der Betrag wird direkt Ihrem Bitcoin-Guthaben gutgeschrieben.",
"depositQRInstruction_rootstock": "Senden Sie nur Rootstock Bitcoin an diese Adresse. Der Betrag wird direkt Ihrem Bitcoin-Guthaben gutgeschrieben.",
"depositQRInstruction_spark": "Senden Sie Bitcoin oder Token an diese Adresse.",
"depositQRInstruction_spark": "Senden Sie Bitcoin an diese Adresse.",
"depositQRInstruction_spark_dollars": "Senden Sie USDB an diese Adresse.",
"depositQRInstruction_spark_tokens": "Senden Sie Token an diese Adresse.",
"depositMinimumStablecoin": "Zahlungen müssen mindestens {{amount}} betragen"
},
"payLinks": {
+7 -3
View File
@@ -1024,7 +1024,8 @@
"depositFunds": "Deposit Funds",
"depositFundsSubtitle": "Add funds to your wallet",
"onChainBitcoin": "Deposit Bitcoin",
"onChainBitcoinSubtitle": "Receive via on-chain address",
"onChainBitcoinSubtitle": "Receive Bitcoin into your wallet",
"depositTokens": "Deposit tokens",
"stablecoins": "Deposit Dollars",
"stablecoinsSubtitle": "Receive Dollars into your wallet",
"cashAppSubtitle": "Send from Cash App instantly",
@@ -1042,9 +1043,11 @@
"viewDetails": "View details",
"othersOptionTitle": "Select Method",
"stablecoinSelectedTitle": "{{curr}} on {{chain}}",
"bitcoinDesc": "Receive on-chain BTC to your wallet",
"liquidDesc": "Receive Liquid BTC to your wallet.",
"roostockDesc": "Receive Rootstock BTC to your wallet.",
"sparkDesc": "Receive BTC or tokens to your wallet.",
"sparkDesc": "Receive BTC to your wallet.",
"tokensDesc": "Receive tokens to your wallet.",
"chooseMethodTitle": "Choose receive method",
"selectMethodTitle": "Add funds",
"copyAddress": "Copy Address",
@@ -1055,8 +1058,9 @@
"depositQRInstruction_bitcoin": "Only send Bitcoin to this address. Funds arrive after three on-chain confirmations.",
"depositQRInstruction_liquid": "Only send Liquid Bitcoin to this address, you will receive it directly to your Bitcoin balance",
"depositQRInstruction_rootstock": "Only send Rootstock Bitcoin to this address, you will receive it directly to your Bitcoin balance.",
"depositQRInstruction_spark": "Send Bitcoin or Tokens to this address.",
"depositQRInstruction_spark": "Send Bitcoin to this address.",
"depositQRInstruction_spark_dollars": "Send USDB to this address.",
"depositQRInstruction_spark_tokens": "Send tokens to this address.",
"depositMinimumStablecoin": "Payments must be at least {{amount}}"
},
"payLinks": {
+5 -2
View File
@@ -1042,9 +1042,11 @@
"viewDetails": "Ver detalles",
"othersOptionTitle": "Seleccionar método",
"stablecoinSelectedTitle": "{{curr}} en {{chain}}",
"bitcoinDesc": "Recibe Bitcoin directamente en tu billetera",
"liquidDesc": "Recibe BTC de Liquid en tu billetera.",
"roostockDesc": "Recibe BTC de Rootstock en tu billetera.",
"sparkDesc": "Recibe BTC o tokens en tu billetera.",
"sparkDesc": "Recibe BTC en tu billetera.",
"tokensDesc": "Recibe tokens en tu billetera.",
"chooseMethodTitle": "Elige método de recepción",
"selectMethodTitle": "Selecciona método de depósito",
"copyAddress": "Copiar dirección",
@@ -1055,8 +1057,9 @@
"depositQRInstruction_bitcoin": "Envía solo Bitcoin a esta dirección. Los fondos llegan después de tres confirmaciones en la cadena.",
"depositQRInstruction_liquid": "Envía solo Liquid Bitcoin a esta dirección. Lo recibirás directamente en tu saldo de Bitcoin",
"depositQRInstruction_rootstock": "Envía solo Rootstock Bitcoin a esta dirección. Lo recibirás directamente en tu saldo de Bitcoin.",
"depositQRInstruction_spark": "Envía Bitcoin o tokens a esta dirección.",
"depositQRInstruction_spark": "Envía Bitcoin a esta dirección.",
"depositQRInstruction_spark_dollars": "Envía USDB a esta dirección.",
"depositQRInstruction_spark_tokens": "Envía tokens a esta dirección.",
"depositMinimumStablecoin": "Los pagos deben ser de al menos {{amount}}"
},
"payLinks": {
+5 -2
View File
@@ -1042,9 +1042,11 @@
"viewDetails": "Voir les détails",
"othersOptionTitle": "Sélectionner une méthode",
"stablecoinSelectedTitle": "{{curr}} sur {{chain}}",
"bitcoinDesc": "Recevez des bitcoins directement dans votre portefeuille",
"liquidDesc": "Recevez du BTC Liquid dans votre portefeuille.",
"roostockDesc": "Recevez du BTC Rootstock dans votre portefeuille.",
"sparkDesc": "Recevez des BTC ou des tokens dans votre portefeuille.",
"sparkDesc": "Recevez des BTC dans votre portefeuille.",
"tokensDesc": "Recevez des jetons dans votre portefeuille.",
"chooseMethodTitle": "Choisir la méthode de réception",
"selectMethodTitle": "Sélectionner la méthode de dépôt",
"copyAddress": "Copier ladresse",
@@ -1055,8 +1057,9 @@
"depositQRInstruction_bitcoin": "Envoyez uniquement du Bitcoin à cette adresse. Les fonds arrivent après trois confirmations on-chain.",
"depositQRInstruction_liquid": "Envoyez uniquement du Liquid Bitcoin à cette adresse. Vous le recevrez directement dans votre solde Bitcoin",
"depositQRInstruction_rootstock": "Envoyez uniquement du Rootstock Bitcoin à cette adresse. Vous le recevrez directement dans votre solde Bitcoin.",
"depositQRInstruction_spark": "Envoyez du Bitcoin ou des tokens à cette adresse.",
"depositQRInstruction_spark": "Envoyez des bitcoins à cette adresse.",
"depositQRInstruction_spark_dollars": "Envoyez de l'USDB à cette adresse.",
"depositQRInstruction_spark_tokens": "Envoyez des jetons à cette adresse.",
"depositMinimumStablecoin": "Les paiements doivent être dau moins {{amount}}"
},
"payLinks": {
+5 -2
View File
@@ -1042,9 +1042,11 @@
"viewDetails": "Visualizza dettagli",
"othersOptionTitle": "Seleziona metodo",
"stablecoinSelectedTitle": "{{curr}} su {{chain}}",
"bitcoinDesc": "Ricevi Bitcoin direttamente nel tuo portafoglio",
"liquidDesc": "Ricevi BTC Liquid nel tuo wallet.",
"roostockDesc": "Ricevi BTC Rootstock nel tuo wallet.",
"sparkDesc": "Ricevi BTC o token nel tuo wallet.",
"sparkDesc": "Ricevi BTC nel tuo portafoglio.",
"tokensDesc": "Ricevi token nel tuo portafoglio.",
"chooseMethodTitle": "Scegli metodo di ricezione",
"selectMethodTitle": "Seleziona metodo di deposito",
"copyAddress": "Copia indirizzo",
@@ -1055,8 +1057,9 @@
"depositQRInstruction_bitcoin": "Invia solo Bitcoin a questo indirizzo. I fondi arrivano dopo tre conferme on-chain.",
"depositQRInstruction_liquid": "Invia solo Liquid Bitcoin a questo indirizzo. Lo riceverai direttamente nel tuo saldo Bitcoin",
"depositQRInstruction_rootstock": "Invia solo Rootstock Bitcoin a questo indirizzo. Lo riceverai direttamente nel tuo saldo Bitcoin.",
"depositQRInstruction_spark": "Invia Bitcoin o token a questo indirizzo.",
"depositQRInstruction_spark": "Invia Bitcoin a questo indirizzo.",
"depositQRInstruction_spark_dollars": "Invia USDB a questo indirizzo.",
"depositQRInstruction_spark_tokens": "Invia token a questo indirizzo.",
"depositMinimumStablecoin": "I pagamenti devono essere di almeno {{amount}}"
},
"payLinks": {
+5 -2
View File
@@ -1041,9 +1041,11 @@
"viewDetails": "Ver detalhes",
"othersOptionTitle": "Selecionar rede",
"stablecoinSelectedTitle": "{{curr}} na {{chain}}",
"bitcoinDesc": "Receba Bitcoin diretamente na sua carteira",
"liquidDesc": "Receba BTC pela rede Liquid",
"roostockDesc": "Receba BTC pela rede Rootstock",
"sparkDesc": "Receba BTC ou tokens pela rede Spark",
"sparkDesc": "Receba BTC na sua carteira.",
"tokensDesc": "Receba tokens na sua carteira.",
"chooseMethodTitle": "Escolha o método de recebimento",
"selectMethodTitle": "Adicionar fundos",
"copyAddress": "Copiar endereço",
@@ -1054,8 +1056,9 @@
"depositQRInstruction_bitcoin": "Envie apenas Bitcoin para este endereço. Os fundos chegam após três confirmações na rede Bitcoin",
"depositQRInstruction_liquid": "Envie apenas Liquid Bitcoin para este endereço. Você receberá diretamente no seu saldo em Bitcoin",
"depositQRInstruction_rootstock": "Envie apenas Bitcoin na rede Rootstock para este endereço. Você receberá diretamente no seu saldo em Bitcoin",
"depositQRInstruction_spark": "Envie apenas Bitcoin ou tokens na rede Spark",
"depositQRInstruction_spark": "Envie Bitcoin para este endereço.",
"depositQRInstruction_spark_dollars": "Envie USDB para este endereço. Você receberá diretamente no seu saldo em dólares",
"depositQRInstruction_spark_tokens": "Envie tokens para este endereço.",
"depositMinimumStablecoin": "Os pagamentos devem ser de pelo menos {{amount}}"
},
"payLinks": {
+5 -2
View File
@@ -1042,9 +1042,11 @@
"viewDetails": "Подробнее",
"othersOptionTitle": "Выберите метод",
"stablecoinSelectedTitle": "{{curr}} в сети {{chain}}",
"bitcoinDesc": "Получайте Bitcoin напрямую в свой кошелёк",
"liquidDesc": "Получайте Liquid BTC на свой кошелёк.",
"roostockDesc": "Получайте Rootstock BTC на свой кошелёк.",
"sparkDesc": "Получайте BTC или токены на свой кошелёк.",
"sparkDesc": "Получайте BTC в свой кошелёк.",
"tokensDesc": "Получайте токены в свой кошелёк.",
"chooseMethodTitle": "Выберите способ получения",
"selectMethodTitle": "Выберите способ депозита",
"copyAddress": "Скопировать адрес",
@@ -1055,8 +1057,9 @@
"depositQRInstruction_bitcoin": "Отправляйте на этот адрес только Bitcoin. Средства поступят после трёх подтверждений в сети.",
"depositQRInstruction_liquid": "Отправляйте на этот адрес только Liquid Bitcoin. Средства поступят прямо на ваш баланс Bitcoin",
"depositQRInstruction_rootstock": "Отправляйте на этот адрес только Rootstock Bitcoin. Средства поступят прямо на ваш баланс Bitcoin.",
"depositQRInstruction_spark": "Отправляйте Bitcoin или токены на этот адрес.",
"depositQRInstruction_spark": "Отправьте Bitcoin на этот адрес.",
"depositQRInstruction_spark_dollars": "Отправляйте USDB на этот адрес.",
"depositQRInstruction_spark_tokens": "Отправьте токены на этот адрес.",
"depositMinimumStablecoin": "Сумма платежа должна быть не менее {{amount}}"
},
"payLinks": {
+5 -2
View File
@@ -1042,9 +1042,11 @@
"viewDetails": "Visa detaljer",
"othersOptionTitle": "Välj metod",
"stablecoinSelectedTitle": "{{curr}} på {{chain}}",
"bitcoinDesc": "Ta emot Bitcoin direkt till din plånbok",
"liquidDesc": "Ta emot Liquid BTC till din plånbok.",
"roostockDesc": "Ta emot Rootstock BTC till din plånbok.",
"sparkDesc": "Ta emot BTC eller token till din plånbok.",
"sparkDesc": "Ta emot BTC till din plånbok.",
"tokensDesc": "Ta emot token till din plånbok.",
"chooseMethodTitle": "Välj mottagningsmetod",
"selectMethodTitle": "Välj insättningsmetod",
"copyAddress": "Kopiera adress",
@@ -1055,8 +1057,9 @@
"depositQRInstruction_bitcoin": "Skicka bara Bitcoin till den här adressen. Pengarna kommer efter tre bekräftelser på kedjan.",
"depositQRInstruction_liquid": "Skicka bara Liquid Bitcoin till den här adressen. Du får det direkt till ditt Bitcoin-saldo",
"depositQRInstruction_rootstock": "Skicka bara Rootstock Bitcoin till den här adressen. Du får det direkt till ditt Bitcoin-saldo.",
"depositQRInstruction_spark": "Skicka Bitcoin eller tokens till denna adress.",
"depositQRInstruction_spark": "Skicka Bitcoin till den här adressen.",
"depositQRInstruction_spark_dollars": "Skicka USDB till denna adress.",
"depositQRInstruction_spark_tokens": "Skicka token till den här adressen.",
"depositMinimumStablecoin": "Betalningar måste vara minst {{amount}}"
},
"payLinks": {