@@ -20,7 +20,7 @@ import { useGnoNativeContext } from '@gnolang/gnonative'
20
20
import { router } from 'expo-router'
21
21
import { useEffect , useState } from 'react'
22
22
import * as Linking from 'expo-linking'
23
- import { ScrollView , View , TouchableOpacity , Text as RNText } from 'react-native'
23
+ import { ScrollView , View , TouchableOpacity , Text as RNText , Alert } from 'react-native'
24
24
import { Button , ButtonText , FormItem , FormItemInline , Spacer , Text } from '@/modules/ui-components'
25
25
import styled from 'styled-components/native'
26
26
import PrettyJSON from '../../../modules/ui-components/src/ui/PrettyJSON'
@@ -45,10 +45,9 @@ export default function Page() {
45
45
// const session = useAppSelector(selectSession);
46
46
// const sessionWanted = useAppSelector(selectSessionWanted);
47
47
48
- console . log ( 'txInput' , txInput )
49
- console . log ( 'bech32Address' , bech32Address )
50
- console . log ( 'clientName' , clientName )
51
- console . log ( 'reason' , reason )
48
+ console . log (
49
+ `tosign screen -> broadcast: ${ broadcast } , bech32Address: ${ bech32Address } , clientName: ${ clientName } , reason: ${ reason } , txInput: ${ txInput } `
50
+ )
52
51
// console.log('session', session);
53
52
// console.log('sessionWanted', sessionWanted);
54
53
@@ -100,8 +99,12 @@ export default function Page() {
100
99
if ( ! txInput || ! keyInfo ) throw new Error ( 'No transaction input or keyInfo found.' )
101
100
102
101
if ( broadcast ) {
103
- await gnonative . broadcastTxCommit ( txInput )
104
- console . log ( 'broadcasting the tx' , txInput )
102
+ if ( ! signedTx ) {
103
+ Alert . alert ( 'No signedTx' )
104
+ return
105
+ }
106
+ const res = await gnonative . broadcastTxCommit ( signedTx )
107
+ console . log ( 'broadcasting the tx' , signedTx , res )
105
108
router . push ( '/home' )
106
109
return
107
110
}
@@ -272,11 +275,11 @@ export default function Page() {
272
275
273
276
< FormItem label = "Raw Transaction Data" > { txInput && < PrettyJSON data = { JSON . parse ( txInput || '' ) } /> } </ FormItem >
274
277
275
- < Ruller />
278
+ { /* <Ruller /> */ }
276
279
277
- < FormItem label = "Raw Signed Data" >
278
- < TextBodyWhite > { signedTx && < PrettyJSON data = { JSON . parse ( signedTx || '' ) } /> } </ TextBodyWhite >
279
- </ FormItem >
280
+ { /* <FormItem label="Raw Signed Data">
281
+ <TextBodyWhite>{signedTx && <PrettyJSON data={JSON.parse(signedTx)} />}</TextBodyWhite>
282
+ </FormItem> */ }
280
283
</ HiddenGroup >
281
284
</ ScrollView >
282
285
0 commit comments