Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ export function Nft({ asset, onPress }: NftProps) {
onPress(asset);
}, [asset, onPress]);

const testID = `nft-${asset.name || asset.collectionName || asset.tokenId}`;

return (
<Pressable
testID={testID}
style={({ pressed }) =>
tw.style(
'w-full flex-row items-center justify-between py-2',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ export function Recipient({
onPress={handlePressRecipient}
>
<Box twClassName="flex-row items-center">
<Box twClassName="h-12 justify-center">
<Box
twClassName="h-12 justify-center"
testID={`recipient-avatar-${recipient.address}`}
>
<Avatar
variant={AvatarVariant.Account}
type={accountAvatarType}
Expand Down
16 changes: 15 additions & 1 deletion app/components/Views/confirmations/components/send/send.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { createStackNavigator } from '@react-navigation/stack';
import { useRoute } from '@react-navigation/native';

import Routes from '../../../../../constants/navigation/Routes';
import { SendContextProvider } from '../../context/send-context';
Expand All @@ -15,26 +16,39 @@ import { useEmptyNavHeaderForConfirmations } from '../../hooks/ui/useEmptyNavHea
const Stack = createStackNavigator();

export const Send = () => {
const route = useRoute();
const sendNavigationOptions = useSendNavbar();
const emptyNavHeaderOptions = useEmptyNavHeaderForConfirmations();
const initialParams = route.params as { screen?: string } | undefined;
const initialRouteName =
initialParams?.screen === Routes.SEND.ASSET ||
initialParams?.screen === Routes.SEND.RECIPIENT
? initialParams.screen
: Routes.SEND.AMOUNT;

return (
<SendContextProvider>
<SendMetricsContextProvider>
<Stack.Navigator headerMode="screen">
<Stack.Navigator
headerMode="screen"
initialRouteName={initialRouteName}
>
<Stack.Screen
name={Routes.SEND.AMOUNT}
component={Amount}
initialParams={initialParams}
options={sendNavigationOptions.Amount}
/>
<Stack.Screen
name={Routes.SEND.ASSET}
component={Asset}
initialParams={initialParams}
options={sendNavigationOptions.Asset}
/>
<Stack.Screen
name={Routes.SEND.RECIPIENT}
component={Recipient}
initialParams={initialParams}
options={sendNavigationOptions.Recipient}
/>
<Stack.Screen
Expand Down
Loading
Loading