From 8f998bf55d2925bbe5e40e5f7c465415d4d7c5df Mon Sep 17 00:00:00 2001 From: banklesss <105349292+banklesss@users.noreply.github.com> Date: Thu, 29 Aug 2024 10:21:26 +0200 Subject: [PATCH] fix(wallet-mobile): qr theming (#3572) Signed-off-by: banklesss <105349292+banklesss@users.noreply.github.com> --- .../CaptureShareQRCodeCard.tsx | 4 ++-- .../components/ShareQRCodeCard/ShareQRCodeCard.tsx | 6 +++--- .../CreateExchangeOrderScreen.tsx | 2 ++ .../TxDetails/AddressModal/AddressModal.tsx | 14 +++++++++++--- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/apps/wallet-mobile/src/components/ShareQRCodeCard/CaptureShareQRCodeCard/CaptureShareQRCodeCard.tsx b/apps/wallet-mobile/src/components/ShareQRCodeCard/CaptureShareQRCodeCard/CaptureShareQRCodeCard.tsx index 24fe505964..49d88eadd1 100644 --- a/apps/wallet-mobile/src/components/ShareQRCodeCard/CaptureShareQRCodeCard/CaptureShareQRCodeCard.tsx +++ b/apps/wallet-mobile/src/components/ShareQRCodeCard/CaptureShareQRCodeCard/CaptureShareQRCodeCard.tsx @@ -32,7 +32,7 @@ export const CaptureShareQRCodeCard = ({content}: ShareProps) => { - + @@ -50,7 +50,7 @@ const useStyles = () => { const styles = StyleSheet.create({ qrCode: { - backgroundColor: color.bg_color_high, + backgroundColor: color.white_static, padding: 10, borderRadius: 8, }, diff --git a/apps/wallet-mobile/src/components/ShareQRCodeCard/ShareQRCodeCard.tsx b/apps/wallet-mobile/src/components/ShareQRCodeCard/ShareQRCodeCard.tsx index 5036dfccea..a5ffe6b0cf 100644 --- a/apps/wallet-mobile/src/components/ShareQRCodeCard/ShareQRCodeCard.tsx +++ b/apps/wallet-mobile/src/components/ShareQRCodeCard/ShareQRCodeCard.tsx @@ -123,7 +123,7 @@ const useStyles = () => { const styles = StyleSheet.create({ qrCode: { - backgroundColor: color.bg_color_high, + backgroundColor: color.white_static, padding: 10, borderRadius: 8, }, @@ -175,8 +175,8 @@ const useStyles = () => { const colors = { bgCard: color.bg_gradient_1, - white: color.gray_cmin, - black: color.gray_cmax, + white: color.white_static, + black: color.black_static, } return {styles, colors, qrSize} as const diff --git a/apps/wallet-mobile/src/features/Exchange/useCases/CreateExchangeOrderScreen/CreateExchangeOrderScreen.tsx b/apps/wallet-mobile/src/features/Exchange/useCases/CreateExchangeOrderScreen/CreateExchangeOrderScreen.tsx index 555d2ca7bb..e375404b61 100644 --- a/apps/wallet-mobile/src/features/Exchange/useCases/CreateExchangeOrderScreen/CreateExchangeOrderScreen.tsx +++ b/apps/wallet-mobile/src/features/Exchange/useCases/CreateExchangeOrderScreen/CreateExchangeOrderScreen.tsx @@ -102,6 +102,8 @@ export const CreateExchangeOrderScreen = () => { openModal('', , undefined, undefined, true) }, onSuccess: (referralLink) => { + closeModal() + if (referralLink.toString() !== '') { Linking.openURL(referralLink.toString()) track.exchangeSubmitted({ramp_type: orderType === 'sell' ? 'Sell' : 'Buy', ada_amount: orderAmount}) diff --git a/apps/wallet-mobile/src/features/Transactions/useCases/TxDetails/AddressModal/AddressModal.tsx b/apps/wallet-mobile/src/features/Transactions/useCases/TxDetails/AddressModal/AddressModal.tsx index b63b0fd747..d7adc14ee6 100644 --- a/apps/wallet-mobile/src/features/Transactions/useCases/TxDetails/AddressModal/AddressModal.tsx +++ b/apps/wallet-mobile/src/features/Transactions/useCases/TxDetails/AddressModal/AddressModal.tsx @@ -25,7 +25,7 @@ type Props = { export const AddressModal = ({address, path}: Props) => { const strings = useStrings() const keyHashes = useKeyHashes({address}) - const {styles} = useStyles() + const {styles, colors} = useStyles() const { meta: {implementation}, } = useSelectedWallet() @@ -35,7 +35,7 @@ export const AddressModal = ({address, path}: Props) => { return ( - + @@ -142,5 +142,13 @@ const useStyles = () => { color: color.gray_c900, }, }) - return {styles} + + const colors = { + white: color.white_static, + black: color.black_static, + transparent: 'transparent', + backgroundGradientCard: color.bg_gradient_1, + } + + return {styles, colors} as const }