@@ -9,12 +9,8 @@ import { PayloadBuilder } from '@xyo-network/payload-builder'
99import { type HashPayload } from '@xyo-network/xl1-protocol'
1010import { useState } from 'react'
1111
12- import {
13- RunProducerAlerts , TxConfirmedAlert , WalletAlerts ,
14- } from './components/index.ts'
12+ import { Onboarding , TxConfirmedAlert , WelcomeStack } from './components/index.ts'
1513import { useDefaultGateway , useOnBoarding } from './hooks/index.ts'
16- // eslint-disable-next-line import-x/no-internal-modules
17- import Xl13DLogo from './images/XL1_3D_Token_Mainnet.svg'
1814
1915// Data to store off-chain
2016const offChainPayloads : Id [ ] = [ 0 , 1 ] . map ( index => ( {
@@ -26,9 +22,7 @@ export const XL1BrowserSample = () => {
2622 const [ error , setError ] = useState < Error > ( )
2723 const [ confirmed , setConfirmed ] = useState < Hash > ( )
2824 const { gateway, error : gatewayError } = useDefaultGateway ( )
29- const {
30- producerIsReachable, walletIsInstalled, walletIsNotInstalled, showSubmitTransaction,
31- } = useOnBoarding ( )
25+ const { showSubmitTransaction } = useOnBoarding ( )
3226
3327 const submitTransaction = async ( ) => {
3428 setError ( undefined )
@@ -57,29 +51,14 @@ export const XL1BrowserSample = () => {
5751 } }
5852 >
5953 < Stack width = { { xs : '100%' , sm : '600px' } } gap = { 2 } p = { 2 } >
60- < Stack gap = { 1 } >
61- { gatewayError ? < Alert severity = "error" > { gatewayError . message } </ Alert > : null }
62- < Typography variant = "h4" sx = { { display : 'inline-flex' } } >
63- < img src = { Xl13DLogo } height = { 38 } width = { 38 } style = { { marginRight : '10px' } } />
64- XL1 Browser Sample
65- </ Typography >
66- < Typography variant = "subtitle1" > This is a sample page for adding payloads to the XL1 chain for the browser environment.</ Typography >
67- </ Stack >
68-
69- { /* Onboarding */ }
70- { producerIsReachable ? < RunProducerAlerts . Found /> : < RunProducerAlerts . NotFound /> }
71- { producerIsReachable && < RunProducerAlerts . CopyPhrase /> }
72- { walletIsNotInstalled === true && < WalletAlerts . NotInstalled /> }
73- { walletIsInstalled === true && < WalletAlerts . Installed /> }
74- { walletIsInstalled === true && < WalletAlerts . Setup /> }
54+ { gatewayError ? < Alert severity = "error" > { gatewayError . message } </ Alert > : null }
7555 { error ? < Alert severity = "error" > { error . message } </ Alert > : null }
56+ < WelcomeStack />
57+ < Onboarding />
7658
7759 { /* Transaction Submission */ }
7860 { showSubmitTransaction === true && (
79- < Stack alignItems = "start" >
80- { /* {gatewayError ? <Alert severity="error">{gatewayError.message}</Alert> : null } */ }
81- < Button variant = "contained" onClick = { ( ) => void submitTransaction ( ) } disabled = { isUndefined ( gateway ) } > Submit Transaction</ Button >
82- </ Stack >
61+ < Button variant = "contained" onClick = { ( ) => void submitTransaction ( ) } disabled = { isUndefined ( gateway ) } sx = { { alignSelf : 'start' } } > Submit Transaction</ Button >
8362 ) }
8463 { isDefined ( confirmed ) && < TxConfirmedAlert hash = { confirmed } /> }
8564 </ Stack >
0 commit comments