adding spark to deposit dollars page
This commit is contained in:
+16
-4
@@ -38,7 +38,10 @@ export default function CreateAccumulationAddressDepositModal({
|
||||
scrollEventThrottle={16}
|
||||
onLayout={onLayout}
|
||||
>
|
||||
{ACCUMULATION_CHAINS.map(chain => (
|
||||
{[
|
||||
...ACCUMULATION_CHAINS,
|
||||
{ id: 'spark', label: 'Spark', assets: [] },
|
||||
].map(chain => (
|
||||
<View
|
||||
key={chain.id}
|
||||
onLayout={e => handleRowLayout(chain.id, e.nativeEvent.layout.y)}
|
||||
@@ -46,9 +49,18 @@ export default function CreateAccumulationAddressDepositModal({
|
||||
<ChainRow
|
||||
chain={chain}
|
||||
expanded={expandedChain === chain.id}
|
||||
onToggleExpand={id =>
|
||||
setExpandedChain(prev => (prev === id ? null : id))
|
||||
}
|
||||
disableExpand={chain.id === 'spark'}
|
||||
onToggleExpand={id => {
|
||||
if (chain.id === 'spark') {
|
||||
setExpandedChain(null);
|
||||
onShowQR({
|
||||
selectedRecieveOption: 'spark',
|
||||
fromStablecoin: true,
|
||||
});
|
||||
} else {
|
||||
setExpandedChain(prev => (prev === id ? null : id));
|
||||
}
|
||||
}}
|
||||
onSelectAsset={(c, asset) => {
|
||||
setExpandedChain(null);
|
||||
onShowQR({
|
||||
|
||||
@@ -6,7 +6,7 @@ import Animated, {
|
||||
withTiming,
|
||||
} from 'react-native-reanimated';
|
||||
import { CENTER, ICONS } from '../../../../constants';
|
||||
import { HIDDEN_OPACITY } from '../../../../constants/theme';
|
||||
import { COLORS, HIDDEN_OPACITY } from '../../../../constants/theme';
|
||||
import {
|
||||
CHAIN_ASSET_ROW_HEIGHT,
|
||||
CHAIN_EXPAND_PADDING,
|
||||
@@ -18,6 +18,7 @@ import { useEffect } from 'react';
|
||||
export default function ChainRow({
|
||||
chain,
|
||||
expanded,
|
||||
disableExpand = false,
|
||||
onToggleExpand,
|
||||
onSelectAsset,
|
||||
isAssetTaken,
|
||||
@@ -46,6 +47,8 @@ export default function ChainRow({
|
||||
transform: [{ rotate: `${chevronRotation.value * 180}deg` }],
|
||||
}));
|
||||
|
||||
const isSpark = chain.id === 'spark';
|
||||
|
||||
return (
|
||||
<View>
|
||||
<TouchableOpacity
|
||||
@@ -60,18 +63,37 @@ export default function ChainRow({
|
||||
backgroundColor:
|
||||
theme && darkModeType ? backgroundColor : backgroundOffset,
|
||||
},
|
||||
isSpark && {
|
||||
backgroundColor:
|
||||
theme && darkModeType ? backgroundColor : COLORS.primary,
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Image
|
||||
style={styles.assetIcon}
|
||||
source={ICONS[`chain_${chain.label.toLowerCase()}`]}
|
||||
style={[
|
||||
styles.assetIcon,
|
||||
isSpark && {
|
||||
width: 20,
|
||||
height: 20,
|
||||
},
|
||||
]}
|
||||
source={
|
||||
ICONS[
|
||||
isSpark
|
||||
? 'sparkAsteriskWhite'
|
||||
: `chain_${chain.label.toLowerCase()}`
|
||||
]
|
||||
}
|
||||
contentFit="contain"
|
||||
/>
|
||||
</View>
|
||||
<ThemeText styles={styles.optionLabel} content={chain.label} />
|
||||
|
||||
<Animated.View style={[{ opacity: HIDDEN_OPACITY }, chevronStyle]}>
|
||||
<ThemeIcon iconName="ChevronDown" size={18} />
|
||||
<ThemeIcon
|
||||
iconName={disableExpand ? 'ChevronRight' : 'ChevronDown'}
|
||||
size={18}
|
||||
/>
|
||||
</Animated.View>
|
||||
</TouchableOpacity>
|
||||
|
||||
|
||||
@@ -181,7 +181,11 @@ export default function DepositQRView({
|
||||
asset: config.sourceAsset,
|
||||
chain: capitalize(config.sourceChain),
|
||||
})
|
||||
: t(`wallet.halfModal.depositQRInstruction_${option}`);
|
||||
: t(
|
||||
`wallet.halfModal.depositQRInstruction_${option}${
|
||||
option === 'spark' && config.fromStablecoin ? '_dollars' : ''
|
||||
}`,
|
||||
);
|
||||
|
||||
const address = addressState.generatedAddress || '';
|
||||
const truncatedAddress =
|
||||
|
||||
@@ -1012,7 +1012,7 @@
|
||||
"onChainBitcoin": "Bitcoin einzahlen",
|
||||
"onChainBitcoinSubtitle": "Über eine On-Chain-Adresse empfangen",
|
||||
"stablecoins": "Dollar einzahlen",
|
||||
"stablecoinsSubtitle": "USDT / USDC in Ihre Wallet einzahlen",
|
||||
"stablecoinsSubtitle": "Zahlen Sie Dollar in Ihre Wallet ein",
|
||||
"cashAppSubtitle": "Sofort von Cash App senden",
|
||||
"sparkAddressSubtitle": "An Ihre Spark-Adresse empfangen",
|
||||
"otherBitcoin": "Weitere Einzahlungsoptionen",
|
||||
@@ -1039,7 +1039,8 @@
|
||||
"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 nur Bitcoin oder Tokens an Ihre Spark-Adresse."
|
||||
"depositQRInstruction_spark": "Senden Sie Bitcoin oder Tokens an diese Adresse.",
|
||||
"depositQRInstruction_spark_dollars": "Senden Sie USDB an diese Adresse."
|
||||
},
|
||||
"payLinks": {
|
||||
"skip": "Überspringen",
|
||||
|
||||
@@ -1012,7 +1012,7 @@
|
||||
"onChainBitcoin": "Deposit Bitcoin",
|
||||
"onChainBitcoinSubtitle": "Receive via on-chain address",
|
||||
"stablecoins": "Deposit Dollars",
|
||||
"stablecoinsSubtitle": "Deposit USDT / USDC into your wallet",
|
||||
"stablecoinsSubtitle": "Deposit Dollars into your wallet",
|
||||
"cashAppSubtitle": "Send from Cash App instantly",
|
||||
"sparkAddressSubtitle": "Receive to your Spark address",
|
||||
"otherBitcoin": "Other Deposit Options",
|
||||
@@ -1039,7 +1039,8 @@
|
||||
"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": "Only send Bitcoin or tokens to your Spark address."
|
||||
"depositQRInstruction_spark": "Send Bitcoin or Tokens to this address.",
|
||||
"depositQRInstruction_spark_dollars": "Send USDB to this address."
|
||||
},
|
||||
"payLinks": {
|
||||
"skip": "Skip",
|
||||
|
||||
@@ -1012,7 +1012,7 @@
|
||||
"onChainBitcoin": "Depositar Bitcoin",
|
||||
"onChainBitcoinSubtitle": "Recibir mediante dirección on-chain",
|
||||
"stablecoins": "Depositar dólares",
|
||||
"stablecoinsSubtitle": "Deposita USDT / USDC en tu billetera",
|
||||
"stablecoinsSubtitle": "Deposita dólares en tu billetera",
|
||||
"cashAppSubtitle": "Enviar desde Cash App al instante",
|
||||
"sparkAddressSubtitle": "Recibir en tu dirección Spark",
|
||||
"otherBitcoin": "Otras opciones de depósito",
|
||||
@@ -1039,7 +1039,8 @@
|
||||
"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 solo Bitcoin o tokens a tu dirección Spark."
|
||||
"depositQRInstruction_spark": "Envía Bitcoin o tokens a esta dirección.",
|
||||
"depositQRInstruction_spark_dollars": "Envía USDB a esta dirección."
|
||||
},
|
||||
"payLinks": {
|
||||
"skip": "Omitir",
|
||||
|
||||
@@ -1012,7 +1012,7 @@
|
||||
"onChainBitcoin": "Déposer du Bitcoin",
|
||||
"onChainBitcoinSubtitle": "Recevoir via une adresse on-chain",
|
||||
"stablecoins": "Déposer des dollars",
|
||||
"stablecoinsSubtitle": "Déposez des USDT / USDC dans votre portefeuille",
|
||||
"stablecoinsSubtitle": "Déposez des dollars dans votre portefeuille",
|
||||
"cashAppSubtitle": "Envoyer depuis Cash App instantanément",
|
||||
"sparkAddressSubtitle": "Recevoir sur votre adresse Spark",
|
||||
"otherBitcoin": "Autres options de dépôt",
|
||||
@@ -1039,7 +1039,8 @@
|
||||
"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 uniquement du Bitcoin ou des tokens à votre adresse Spark."
|
||||
"depositQRInstruction_spark": "Envoyez du Bitcoin ou des tokens à cette adresse.",
|
||||
"depositQRInstruction_spark_dollars": "Envoyez de l'USDB à cette adresse."
|
||||
},
|
||||
"payLinks": {
|
||||
"skip": "Passer",
|
||||
|
||||
@@ -1012,7 +1012,7 @@
|
||||
"onChainBitcoin": "Deposita Bitcoin",
|
||||
"onChainBitcoinSubtitle": "Ricevi tramite indirizzo on-chain",
|
||||
"stablecoins": "Deposita dollari",
|
||||
"stablecoinsSubtitle": "Deposita USDT / USDC nel tuo wallet",
|
||||
"stablecoinsSubtitle": "Deposita dollari nel tuo wallet",
|
||||
"cashAppSubtitle": "Invia da Cash App istantaneamente",
|
||||
"sparkAddressSubtitle": "Ricevi sul tuo indirizzo Spark",
|
||||
"otherBitcoin": "Altre opzioni di deposito",
|
||||
@@ -1039,7 +1039,8 @@
|
||||
"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 solo Bitcoin o token al tuo indirizzo Spark."
|
||||
"depositQRInstruction_spark": "Invia Bitcoin o token a questo indirizzo.",
|
||||
"depositQRInstruction_spark_dollars": "Invia USDB a questo indirizzo."
|
||||
},
|
||||
"payLinks": {
|
||||
"skip": "Salta",
|
||||
|
||||
@@ -1012,7 +1012,7 @@
|
||||
"onChainBitcoin": "Endereço Bitcoin",
|
||||
"onChainBitcoinSubtitle": "Receber por endereço bitcoin",
|
||||
"stablecoins": "Dólares Digitais",
|
||||
"stablecoinsSubtitle": "Deposite dólar digital na sua carteira",
|
||||
"stablecoinsSubtitle": "Deposite dólares na sua carteira",
|
||||
"cashAppSubtitle": "Enviar pelo Cash App instantaneamente",
|
||||
"sparkAddressSubtitle": "Receber no seu endereço Spark",
|
||||
"otherBitcoin": "Bitcoin em outras redes",
|
||||
@@ -1039,7 +1039,8 @@
|
||||
"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 ou tokens para este endereço.",
|
||||
"depositQRInstruction_spark_dollars": "Envie USDB para este endereço."
|
||||
},
|
||||
"payLinks": {
|
||||
"skip": "Pular",
|
||||
|
||||
@@ -1012,7 +1012,7 @@
|
||||
"onChainBitcoin": "Пополнить Bitcoin",
|
||||
"onChainBitcoinSubtitle": "Получить через ончейн-адрес",
|
||||
"stablecoins": "Пополнить долларами",
|
||||
"stablecoinsSubtitle": "Пополните кошелёк USDT / USDC",
|
||||
"stablecoinsSubtitle": "Пополните кошелёк долларами",
|
||||
"cashAppSubtitle": "Отправить из Cash App мгновенно",
|
||||
"sparkAddressSubtitle": "Получить на ваш адрес Spark",
|
||||
"otherBitcoin": "Другие варианты пополнения",
|
||||
@@ -1039,7 +1039,8 @@
|
||||
"depositQRInstruction_bitcoin": "Отправляйте на этот адрес только Bitcoin. Средства поступят после трёх подтверждений в сети.",
|
||||
"depositQRInstruction_liquid": "Отправляйте на этот адрес только Liquid Bitcoin. Средства поступят прямо на ваш баланс Bitcoin",
|
||||
"depositQRInstruction_rootstock": "Отправляйте на этот адрес только Rootstock Bitcoin. Средства поступят прямо на ваш баланс Bitcoin.",
|
||||
"depositQRInstruction_spark": "Отправляйте только Bitcoin или токены на ваш адрес Spark."
|
||||
"depositQRInstruction_spark": "Отправляйте Bitcoin или токены на этот адрес.",
|
||||
"depositQRInstruction_spark_dollars": "Отправляйте USDB на этот адрес."
|
||||
},
|
||||
"payLinks": {
|
||||
"skip": "Пропустить",
|
||||
|
||||
@@ -1012,7 +1012,7 @@
|
||||
"onChainBitcoin": "Sätt in Bitcoin",
|
||||
"onChainBitcoinSubtitle": "Ta emot via on-chain-adress",
|
||||
"stablecoins": "Sätt in dollar",
|
||||
"stablecoinsSubtitle": "Sätt in USDT / USDC i din plånbok",
|
||||
"stablecoinsSubtitle": "Sätt in dollar i din plånbok",
|
||||
"cashAppSubtitle": "Skicka från Cash App direkt",
|
||||
"sparkAddressSubtitle": "Ta emot till din Spark-adress",
|
||||
"otherBitcoin": "Andra insättningsalternativ",
|
||||
@@ -1039,7 +1039,8 @@
|
||||
"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 bara Bitcoin eller tokens till din Spark-adress."
|
||||
"depositQRInstruction_spark": "Skicka Bitcoin eller tokens till denna adress.",
|
||||
"depositQRInstruction_spark_dollars": "Skicka USDB till denna adress."
|
||||
},
|
||||
"payLinks": {
|
||||
"skip": "Hoppa över",
|
||||
|
||||
Reference in New Issue
Block a user