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

BugFix: LIVE-3199 - LLM - Receive flow fix isue on receive from market page #897

Merged
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/gentle-ties-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": patch
---

LLM - Receive flow fix issue on receive token accounts from market page
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@ function FabAccountButtonBar({

const onNavigate = useCallback(
(name: string, options?: any) => {
const accountId = account ? account.id : undefined;
const parentId = parentAccount ? parentAccount.id : undefined;
const accountId = account ? account.id : options?.params?.accountId;
const parentId = parentAccount
? parentAccount.id
: options?.params?.parentId;

navigation.navigate(name, {
...options,
params: {
Expand Down
5 changes: 4 additions & 1 deletion apps/ledger-live-mobile/src/components/FabActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,10 @@ const FabMarketActionsComponent: React.FC<Props> = ({
NavigatorName.ReceiveFunds,
{
screen: ScreenName.ReceiveConfirmation,
params: { currency, account: accounts?.[0] },
params: {
parentId: defaultAccount?.parentId,
accountId: defaultAccount.id,
},
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,15 @@ type RouteParams = {
onError?: () => void,
};

export default function ReceiveConfirmation({ navigation, route }: Props) {
const { colors } = useTheme();
export default function ReceiveConfirmation({ navigation }: Props) {
const route = useRoute();
const { account, parentAccount } = useSelector(accountScreenSelector(route));

return account ? <ReceiveConfirmationInner navigation={navigation} route={route} account={account} parentAccount={parentAccount} /> : null
}

function ReceiveConfirmationInner({ navigation, route, account, parentAccount }: Props) {
const { colors } = useTheme();
const { t } = useTranslation();
const verified = route.params?.verified;
const [isModalOpened, setIsModalOpened] = useState(true);
Expand Down