Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 🐞 get rid of 'cantCreateAccount' empty state #9225

Merged
merged 2 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/quiet-buttons-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": minor
---

No empty state for creatable section in add account v2

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import AnimatedGradient from "./components/AnimatedGradient";
import ScanDeviceAccountsFooter from "./components/ScanDeviceAccountsFooter";
import AddressTypeTooltip from "./components/AddressTypeTooltip";
import ScannedAccountsSection from "./components/ScannedAccountsSection";
import { CantCreateAccountAlert } from "./components/CantCreateAccountAlert";
import { useRoute } from "@react-navigation/core";
import { ScanDeviceAccountsNavigationProps } from "./types";
import useAnalytics from "LLM/hooks/useAnalytics";
Expand Down Expand Up @@ -56,9 +55,7 @@ function ScanDeviceAccounts() {
const { analyticsMetadata } = useAnalytics(context, sourceScreenName);

const {
alreadyEmptyAccount,
cantCreateAccount,
CustomNoAssociatedAccounts,
error,
importAccounts,
newAccountSchemes,
Expand Down Expand Up @@ -86,12 +83,6 @@ function ScanDeviceAccounts() {
analyticsMetadata,
});

const emptyTexts = {
creatable: alreadyEmptyAccount ? null : CustomNoAssociatedAccounts ? null : (
<CantCreateAccountAlert currencyName={currency.name} />
),
};

const pageTrackingEvent =
sections?.length === 0
? analyticsMetadata.ScanDeviceAccounts?.onAccessScreen
Expand Down Expand Up @@ -169,7 +160,6 @@ function ScanDeviceAccounts() {
onSelectAll={!selectable || id === "creatable" ? undefined : selectAll}
onUnselectAll={!selectable ? undefined : unselectAll}
selectedIds={selectedIds}
emptyState={emptyTexts[id as keyof typeof emptyTexts]}
isDisabled={!selectable}
forceSelected={id === "existing"}
style={hasMultipleSchemes ? styles.smallMarginBottom : {}}
Expand Down
Loading