Skip to content

Commit e3c668f

Browse files
katspaughcompojoom
authored andcommitted
Feat: active safe slice (#28)
* Feat: active safe slice * Use shortenAddress
1 parent 9dc0821 commit e3c668f

File tree

8 files changed

+377
-298
lines changed

8 files changed

+377
-298
lines changed

app/(tabs)/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
import { SafeFontIcon } from '@/src/components/SafeFontIcon/SafeFontIcon'
22
import PendingTransactions from '@/src/components/StatusBanners/PendingTransactions'
33
import usePendingTxs from '@/src/hooks/usePendingTxs'
4+
import { selectActiveSafe } from '@/src/store/activeSafeSlice'
5+
import { shortenAddress } from '@/src/utils/formatters'
46
import { router } from 'expo-router'
57
import { StyleSheet, TouchableOpacity } from 'react-native'
68
import { SafeAreaView } from 'react-native-safe-area-context'
9+
import { useSelector } from 'react-redux'
710

811
import { Avatar, Text, View } from 'tamagui'
912

1013
export default function HomeScreen() {
1114
const { amount, hasMore, isLoading } = usePendingTxs()
15+
const activeSafe = useSelector(selectActiveSafe)
1216

1317
const onPendingTransactionsPress = () => {
1418
router.push('/pending-transactions')
@@ -28,7 +32,7 @@ export default function HomeScreen() {
2832

2933
<View justifyContent="center" alignItems="center" flexDirection="row">
3034
<Text fontSize="$5" fontWeight={600}>
31-
My DAO
35+
{shortenAddress(activeSafe.address)}
3236
</Text>
3337
<SafeFontIcon name="arrow-down" />
3438
</View>

app/(tabs)/settings.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
import { ScrollView, Text, View } from 'tamagui'
1+
import { NavBarTitle } from '@/src/components/Title/NavBarTitle'
2+
import { SafeAddressInput } from '@/src/features/Settings'
3+
import { ScrollView, View } from 'tamagui'
24

35
export default function SettingsScreen() {
46
return (
57
<ScrollView>
68
<View>
7-
<Text testID="explore-title">Settings</Text>
9+
<NavBarTitle>Settings</NavBarTitle>
10+
11+
<SafeAddressInput />
812
</View>
913
</ScrollView>
1014
)

0 commit comments

Comments
 (0)