From 3eafb932eb811ed23fa0bb743c7680be02c37bc4 Mon Sep 17 00:00:00 2001 From: jorbuedo Date: Thu, 17 Oct 2024 14:50:08 +0200 Subject: [PATCH] drop sanchonet --- .../.storybook/storybook.requires.js | 2 - .../common/ProviderItem/ProviderItem.tsx | 3 +- .../SanchonetFaucetBanner.stories.tsx | 7 - .../ShowBuyBanner/SanchonetFaucetBanner.tsx | 102 -- .../common/ShowBuyBanner/ShowBuyBanner.tsx | 4 - .../features/Exchange/common/useStrings.tsx | 30 - .../CreateExchangeButton.tsx | 18 +- .../CreateExchangeOrderScreen.tsx | 6 +- .../EditAmount/EditAmount.tsx | 3 +- .../ShowDisclaimer/ShowDisclaimer.tsx | 5 +- .../ShowPreprodNotice/ShowPreprodNotice.tsx | 3 +- .../common/helpers/build-token-managers.ts | 5 - .../Portfolio/common/hooks/useNavigateTo.tsx | 4 - .../DashboardTokensList.tsx | 8 +- .../PortfolioTokenDetails/Actions.tsx | 1 - .../PortfolioWalletTokenList.tsx | 4 +- .../ChangeNetwork/NetworkTag.tsx | 20 +- .../SetupWallet/common/useStrings.tsx | 10 - .../useCases/NoFunds/NoFundsScreen.tsx | 7 +- .../src/features/Swap/common/strings.ts | 10 - .../ShowSanchoNoticeScreen.stories.tsx | 8 - .../ShowSanchoNoticeScreen.tsx | 48 - .../Transactions/TxHistoryNavigator.tsx | 10 - .../useCases/TxDetails/TxDetails.tsx | 19 +- .../useCases/TxHistory/ActionsBanner.tsx | 6 - .../WalletManager/common/constants.ts | 6 +- .../helpers/get-wallet-factory.test.ts | 9 - .../helpers/get-wallet-factory.ts | 6 - .../to-chain-supported-network.test.ts | 4 - .../helpers/to-chain-supported-network.ts | 2 - .../network-manager/network-manager.ts | 11 - apps/wallet-mobile/src/kernel/config.ts | 1 - .../src/kernel/i18n/locales/en-US.json | 10 - apps/wallet-mobile/src/kernel/navigation.tsx | 1 - .../features/Exchange/common/useStrings.json | 394 +++--- .../SetupWallet/common/useStrings.json | 662 +++++----- .../src/features/Swap/common/strings.json | 1062 ++++++++--------- .../Transactions/TxHistoryNavigator.json | 184 +-- .../screens/chooseNetworkType.screen.ts | 1 - packages/api/src/cardano/api/config.ts | 3 - .../dapp-connector/src/adapters/api.test.ts | 12 - packages/dapp-connector/src/adapters/api.ts | 1 - packages/explorers/README.md | 15 +- .../explorers/src/explorer-manager.test.ts | 51 - packages/explorers/src/explorer-manager.ts | 20 - .../src/adapters/dullahan-api/api-maker.ts | 16 - packages/staking/src/governance/config.ts | 6 - packages/types/src/chain/network.ts | 2 - 48 files changed, 1104 insertions(+), 1718 deletions(-) delete mode 100644 apps/wallet-mobile/src/features/Exchange/common/ShowBuyBanner/SanchonetFaucetBanner.stories.tsx delete mode 100644 apps/wallet-mobile/src/features/Exchange/common/ShowBuyBanner/SanchonetFaucetBanner.tsx delete mode 100644 apps/wallet-mobile/src/features/Swap/useCases/ShowSanchoNoticeScreen/ShowSanchoNoticeScreen.stories.tsx delete mode 100644 apps/wallet-mobile/src/features/Swap/useCases/ShowSanchoNoticeScreen/ShowSanchoNoticeScreen.tsx diff --git a/apps/wallet-mobile/.storybook/storybook.requires.js b/apps/wallet-mobile/.storybook/storybook.requires.js index ce14bcbce3..4922251289 100644 --- a/apps/wallet-mobile/.storybook/storybook.requires.js +++ b/apps/wallet-mobile/.storybook/storybook.requires.js @@ -134,7 +134,6 @@ const getStories = () => { "./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/SanchonetFaucetBanner.stories.tsx": require("../src/features/Exchange/common/ShowBuyBanner/SanchonetFaucetBanner.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"), @@ -244,7 +243,6 @@ const getStories = () => { "./src/features/Swap/useCases/ConfirmTxScreen/ShowSubmittedTxScreen/ShowSubmittedTxScreen.stories.tsx": require("../src/features/Swap/useCases/ConfirmTxScreen/ShowSubmittedTxScreen/ShowSubmittedTxScreen.stories.tsx"), "./src/features/Swap/useCases/ReviewSwap/TransactionSummary.stories.tsx": require("../src/features/Swap/useCases/ReviewSwap/TransactionSummary.stories.tsx"), "./src/features/Swap/useCases/ShowPreprodNoticeScreen/ShowPreprodNoticeScreen.stories.tsx": require("../src/features/Swap/useCases/ShowPreprodNoticeScreen/ShowPreprodNoticeScreen.stories.tsx"), - "./src/features/Swap/useCases/ShowSanchoNoticeScreen/ShowSanchoNoticeScreen.stories.tsx": require("../src/features/Swap/useCases/ShowSanchoNoticeScreen/ShowSanchoNoticeScreen.stories.tsx"), "./src/features/Swap/useCases/StartOrderSwapScreen/CreateOrder/Actions/AmountActions/AmountActions.stories.tsx": require("../src/features/Swap/useCases/StartOrderSwapScreen/CreateOrder/Actions/AmountActions/AmountActions.stories.tsx"), "./src/features/Swap/useCases/StartOrderSwapScreen/CreateOrder/Actions/AmountActions/ResetQuantities.stories.tsx": require("../src/features/Swap/useCases/StartOrderSwapScreen/CreateOrder/Actions/AmountActions/ResetQuantities.stories.tsx"), "./src/features/Swap/useCases/StartOrderSwapScreen/CreateOrder/Actions/AmountActions/SwitchTokens.stories.tsx": require("../src/features/Swap/useCases/StartOrderSwapScreen/CreateOrder/Actions/AmountActions/SwitchTokens.stories.tsx"), diff --git a/apps/wallet-mobile/src/features/Exchange/common/ProviderItem/ProviderItem.tsx b/apps/wallet-mobile/src/features/Exchange/common/ProviderItem/ProviderItem.tsx index 601ff50b3f..526c9afef1 100644 --- a/apps/wallet-mobile/src/features/Exchange/common/ProviderItem/ProviderItem.tsx +++ b/apps/wallet-mobile/src/features/Exchange/common/ProviderItem/ProviderItem.tsx @@ -24,11 +24,10 @@ export const ProviderItem = ({onPress, fee, rightAdornment, leftAdornment, disab const {orderType} = useExchange() const isPreprod = network === Chain.Network.Preprod - const isSancho = network === Chain.Network.Sancho const isMainnet = network === Chain.Network.Mainnet const isBuy = orderType === 'buy' - if ((isPreprod || isSancho) && isBuy) return null + if (isPreprod && isBuy) return null return ( <> diff --git a/apps/wallet-mobile/src/features/Exchange/common/ShowBuyBanner/SanchonetFaucetBanner.stories.tsx b/apps/wallet-mobile/src/features/Exchange/common/ShowBuyBanner/SanchonetFaucetBanner.stories.tsx deleted file mode 100644 index 33790e96d1..0000000000 --- a/apps/wallet-mobile/src/features/Exchange/common/ShowBuyBanner/SanchonetFaucetBanner.stories.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import {storiesOf} from '@storybook/react-native' -import React from 'react' - -import {SanchonetFaucetBanner} from './SanchonetFaucetBanner' - -storiesOf('Exchange SanchonetFaucetBanner', module) // - .add('initial', () => ) diff --git a/apps/wallet-mobile/src/features/Exchange/common/ShowBuyBanner/SanchonetFaucetBanner.tsx b/apps/wallet-mobile/src/features/Exchange/common/ShowBuyBanner/SanchonetFaucetBanner.tsx deleted file mode 100644 index 1180aae206..0000000000 --- a/apps/wallet-mobile/src/features/Exchange/common/ShowBuyBanner/SanchonetFaucetBanner.tsx +++ /dev/null @@ -1,102 +0,0 @@ -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} from '../../../../components/Button/Button' -import {Space} from '../../../../components/Space/Space' -import {Spacer} from '../../../../components/Spacer/Spacer' -import {useStrings} from '../useStrings' -import {PreprodFaucetBannerLogo} from './PreprodFaucetBannerLogo' - -export const SanchonetFaucetBanner = () => { - const strings = useStrings() - const {styles, colors} = useStyles() - - const handleOnPress = () => { - Linking.openURL('https://sancho.network/faucet/') - } - - return ( - - - {strings.sanchoFaucetBannerTitle} - - - - - - - - - {strings.sanchoFaucetBannerText} - - - -