diff --git a/src/components/scenes/DefaultFiatSettingScene.tsx b/src/components/scenes/DefaultFiatSettingScene.tsx index 8c6040cf148..93545ab49c9 100644 --- a/src/components/scenes/DefaultFiatSettingScene.tsx +++ b/src/components/scenes/DefaultFiatSettingScene.tsx @@ -76,8 +76,12 @@ export class DefaultFiatSettingComponent extends React.Component { render() { const filteredArray = this.props.supportedFiats.filter(entry => { + const key = `currency_label_${entry.value}` + const subTitle = lstrings[key as keyof typeof lstrings] ?? '' + const lowerCaseText = this.state.searchTerm.toLowerCase() return ( + subTitle.toLowerCase().includes(lowerCaseText) || FIAT_COUNTRY[entry.value]?.countryName.toLowerCase().includes(lowerCaseText) || entry.label.toLowerCase().includes(lowerCaseText) || entry.value.toLowerCase().includes(lowerCaseText) diff --git a/src/components/scenes/WalletListScene.tsx b/src/components/scenes/WalletListScene.tsx index 417a98b8d89..e62ac830dc5 100644 --- a/src/components/scenes/WalletListScene.tsx +++ b/src/components/scenes/WalletListScene.tsx @@ -13,6 +13,7 @@ import { EdgeButton } from '../buttons/EdgeButton' import { SceneButtons } from '../buttons/SceneButtons' import { CrossFade } from '../common/CrossFade' import { SceneWrapper } from '../common/SceneWrapper' +import { WalletListModal, WalletListResult } from '../modals/WalletListModal' import { SortOption, WalletListSortModal } from '../modals/WalletListSortModal' import { AccountSyncBar } from '../progress-indicators/AccountSyncBar' import { Airship, showError } from '../services/AirshipInstance' @@ -85,6 +86,33 @@ export function WalletListScene(props: Props) { navigation.navigate('walletRestore') }) + const tokenSupportingWalletIds = React.useMemo(() => { + const walletIds: string[] = [] + for (const wallet of Object.values(account.currencyWallets)) { + if (Object.keys(wallet.currencyConfig.builtinTokens).length > 0) { + walletIds.push(wallet.id) + } + } + return walletIds + }, [account]) + + const handlePressAddEditToken = useHandler(async () => { + const walletListResult = await Airship.show(bridge => ( + + )) + if (walletListResult?.type === 'wallet') { + const { walletId } = walletListResult + navigation.navigate('editToken', { + walletId + }) + } + }) + const handleFooterLayoutHeight = useHandler((height: number) => { setFooterHeight(height) }) @@ -98,8 +126,11 @@ export function WalletListScene(props: Props) { }, [handleSort, navigation, isSearching, sorting]) const renderListFooter = React.useMemo(() => { + if (isSearching && tokenSupportingWalletIds.length > 0) { + return + } return - }, [handlePressRestoreWallets]) + }, [handlePressAddEditToken, handlePressRestoreWallets, tokenSupportingWalletIds, isSearching]) const renderFooter: FooterRender = React.useCallback( sceneWrapperInfo => { diff --git a/src/constants/plugins/sellPluginList.json b/src/constants/plugins/sellPluginList.json index 1453be2732f..94aa43aa1d6 100644 --- a/src/constants/plugins/sellPluginList.json +++ b/src/constants/plugins/sellPluginList.json @@ -12,7 +12,7 @@ "US" ], "notStateProvinces": { - "US": ["AK", "AR", "CT", "NC", "NY", "TX", "FL"] + "US": ["AK", "AR", "CT", "LA", "NC", "NY", "TX", "FL"] }, "cryptoCodes": [], "paymentTypeLogoKey": "bank"