Skip to content

Commit e40f4bc

Browse files
committed
refactor
1 parent abda39b commit e40f4bc

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

mobile/app/(app)/tosign/index.tsx

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import {
3030
BetaVersionMiniBanner,
3131
Ruller
3232
} from '@/modules/ui-components'
33+
import styled from 'styled-components/native'
3334

3435
export default function Page() {
3536
const dispatch = useAppDispatch()
@@ -187,7 +188,7 @@ export default function Page() {
187188
<FormItem label="Callback" value={callback} />
188189
<Ruller />
189190
<FormItem label="Address">
190-
<Text.LinkText weight="500" style={{ flexShrink: 1, textAlign: 'right' }}>{`${bech32Address}`}</Text.LinkText>
191+
<LinkJsonText style={{ textAlign: 'right' }}>{`${bech32Address}`}</LinkJsonText>
191192
</FormItem>
192193
<Ruller />
193194
<FormItem label="Account Name" value={JSON.stringify(keyInfo?.name)} />
@@ -199,31 +200,23 @@ export default function Page() {
199200

200201
<HiddenGroup>
201202
<FormItem label="Raw Tx Data">
202-
<Text.LinkText weight="500" style={{ flexShrink: 1 }}>
203-
{txInput}
204-
</Text.LinkText>
203+
<LinkJsonText>{txInput}</LinkJsonText>
204+
</FormItem>
205+
<Ruller />
206+
<FormItem label="Raw Signed Data">
207+
{signedTx ? <LinkJsonText>{signedTx?.toString()}</LinkJsonText> : <ActivityIndicator />}
205208
</FormItem>
206209
{/* <FormItem label="Session wanted">
207210
<TextBodyWhite>{JSON.stringify(sessionWanted)}</TextBodyWhite>
208211
</FormItem>
209-
210212
<Ruller />
211-
212213
<FormItem label="Session">
213214
<TextBodyWhite>{session ? JSON.stringify(session) : 'undefined'}</TextBodyWhite>
214215
</FormItem>
215-
216216
<Ruller />
217-
218217
<FormItem label="Realms Allowed">
219218
<TextBodyWhite>gno.land/r/berty/social</TextBodyWhite>
220219
</FormItem>*/}
221-
222-
<Ruller />
223-
224-
<FormItem label="Raw Signed Data">
225-
{signedTx ? <Text.Body_Bold>{signedTx?.toString()}</Text.Body_Bold> : <ActivityIndicator />}
226-
</FormItem>
227220
</HiddenGroup>
228221
</ScrollView>
229222
</>
@@ -233,6 +226,11 @@ export default function Page() {
233226
)
234227
}
235228

229+
const LinkJsonText = styled(Text.LinkText)`
230+
weight: 500;
231+
flex-shrink: 1;
232+
`
233+
236234
const HiddenGroup = ({ children }: React.PropsWithChildren) => {
237235
const [visible, setVisible] = useState(false)
238236

0 commit comments

Comments
 (0)