diff --git a/apps/wallet-mobile/.storybook/storybook.requires.js b/apps/wallet-mobile/.storybook/storybook.requires.js index 43e2a175ed..f9e8d4ed9f 100644 --- a/apps/wallet-mobile/.storybook/storybook.requires.js +++ b/apps/wallet-mobile/.storybook/storybook.requires.js @@ -133,6 +133,7 @@ const getStories = () => { "./src/features/Exchange/common/ProviderItem/ProviderItem.stories.tsx": require("../src/features/Exchange/common/ProviderItem/ProviderItem.stories.tsx"), "./src/features/Exchange/common/ShowBuyBanner/BuyBannerBig.stories.tsx": require("../src/features/Exchange/common/ShowBuyBanner/BuyBannerBig.stories.tsx"), "./src/features/Exchange/common/ShowBuyBanner/BuyBannerSmall.stories.tsx": require("../src/features/Exchange/common/ShowBuyBanner/BuyBannerSmall.stories.tsx"), + "./src/features/Exchange/common/ShowBuyBanner/PreprodFaucetBanner.stories.tsx": require("../src/features/Exchange/common/ShowBuyBanner/PreprodFaucetBanner.stories.tsx"), "./src/features/Exchange/common/ShowBuyBanner/ShowBuyBanner.stories.tsx": require("../src/features/Exchange/common/ShowBuyBanner/ShowBuyBanner.stories.tsx"), "./src/features/Exchange/useCases/CreateExchangeOrderScreen/CreateExchangeOrderScreen.stories.tsx": require("../src/features/Exchange/useCases/CreateExchangeOrderScreen/CreateExchangeOrderScreen.stories.tsx"), "./src/features/Exchange/useCases/CreateExchangeOrderScreen/EditAmount/EditAmount.stories.tsx": require("../src/features/Exchange/useCases/CreateExchangeOrderScreen/EditAmount/EditAmount.stories.tsx"), diff --git a/apps/wallet-mobile/src/features/Discover/useCases/ReviewTransaction/ReviewTransaction.tsx b/apps/wallet-mobile/src/features/Discover/useCases/ReviewTransaction/ReviewTransaction.tsx index e6e9aa0789..e2bb13f90a 100644 --- a/apps/wallet-mobile/src/features/Discover/useCases/ReviewTransaction/ReviewTransaction.tsx +++ b/apps/wallet-mobile/src/features/Discover/useCases/ReviewTransaction/ReviewTransaction.tsx @@ -186,7 +186,7 @@ const getTxDetails = async (cbor: string): Promise => { } const useTxDetails = (cbor: string) => { - return useQuery({queryFn: () => getTxDetails(cbor)}) + return useQuery({queryFn: () => getTxDetails(cbor), queryKey: ['txDetails', cbor]}) } const useFormattedTransaction = (cbor: string) => { diff --git a/apps/wallet-mobile/src/features/Exchange/common/ShowBuyBanner/PreprodFaucetBanner.stories.tsx b/apps/wallet-mobile/src/features/Exchange/common/ShowBuyBanner/PreprodFaucetBanner.stories.tsx new file mode 100644 index 0000000000..a99b7fd7eb --- /dev/null +++ b/apps/wallet-mobile/src/features/Exchange/common/ShowBuyBanner/PreprodFaucetBanner.stories.tsx @@ -0,0 +1,7 @@ +import {storiesOf} from '@storybook/react-native' +import React from 'react' + +import {PreprodFaucetBanner} from './PreprodFaucetBanner' + +storiesOf('Exchange PreprodFaucetBanner', module) // + .add('initial', () => ) diff --git a/apps/wallet-mobile/src/features/Exchange/common/ShowBuyBanner/PreprodFaucetBanner.tsx b/apps/wallet-mobile/src/features/Exchange/common/ShowBuyBanner/PreprodFaucetBanner.tsx new file mode 100644 index 0000000000..1a5156405a --- /dev/null +++ b/apps/wallet-mobile/src/features/Exchange/common/ShowBuyBanner/PreprodFaucetBanner.tsx @@ -0,0 +1,111 @@ +import {useTheme} from '@yoroi/theme' +import * as React from 'react' +import {Linking, StyleSheet, Text, View} from 'react-native' +import LinearGradient from 'react-native-linear-gradient' + +import {Button, Spacer} from '../../../../components' +import {Space} from '../../../../components/Space/Space' +import {PreprodFaucetBannerLogo} from '../../illustrations/PreprodFaucetBannerLogo' +import {useStrings} from '../useStrings' + +export const PreprodFaucetBanner = () => { + const strings = useStrings() + const {styles, colors} = useStyles() + + const handleOnPress = () => { + Linking.openURL('https://docs.cardano.org/cardano-testnets/tools/faucet/') + } + + return ( + <> + + + + {strings.preprodFaucetBannerTitle} + + + + + + + + + {strings.preprodFaucetBannerText} + + + +