Skip to content

Commit

Permalink
LIVE-3199 - LLm - Receive flow fix isue on receive from market page
Browse files Browse the repository at this point in the history
  • Loading branch information
LFBarreto committed Aug 10, 2022
1 parent 5fd9448 commit bb92400
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
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

0 comments on commit bb92400

Please sign in to comment.