@@ -47,11 +47,11 @@ const OfferCreation = ({ onStartGuidedWorkflow }) => {
4747 const [ txHash , setTxHash ] = useState ( '' ) ;
4848 const [ txStatus , setTxStatus ] = useState ( null ) ;
4949 const [ showConfirmation , setShowConfirmation ] = useState ( false ) ;
50- const [ devMode , setDevMode ] = useState ( false ) ;
50+ const [ devnetBypass , setDevnetBypass ] = useState ( false ) ;
5151
5252 // Connection status tracking
5353 const isWalletConnected = wallet . connected && wallet . publicKey ;
54- const isSmartContractReady = ( isWalletConnected && program && connection && connectionStatus === CONNECTION_STATUS . CONNECTED ) || devMode ;
54+ const isSmartContractReady = ( isWalletConnected && program && connection && connectionStatus === CONNECTION_STATUS . CONNECTED ) || devnetBypass ;
5555 const isConnectionFailed = connectionStatus === CONNECTION_STATUS . FAILED ;
5656 const isConnectionRetrying = connectionStatus === CONNECTION_STATUS . RETRYING ;
5757 const isConnectionConnecting = connectionStatus === CONNECTION_STATUS . CONNECTING ;
@@ -67,9 +67,9 @@ const OfferCreation = ({ onStartGuidedWorkflow }) => {
6767 hasConnection : ! ! connection ,
6868 connectionStatus,
6969 isSmartContractReady,
70- devMode
70+ devnetBypass
7171 } ) ;
72- } , [ isWalletConnected , wallet , program , connection , connectionStatus , isSmartContractReady , devMode ] ) ;
72+ } , [ isWalletConnected , wallet , program , connection , connectionStatus , isSmartContractReady , devnetBypass ] ) ;
7373
7474 // Track connection status for better UX
7575 useEffect ( ( ) => {
@@ -83,15 +83,15 @@ const OfferCreation = ({ onStartGuidedWorkflow }) => {
8383 const getConnectionStatusMessage = ( ) => {
8484 switch ( connectionStatus ) {
8585 case CONNECTION_STATUS . CONNECTING :
86- return 'Connecting to Solana blockchain ...' ;
86+ return 'Connecting to Solana devnet ...' ;
8787 case CONNECTION_STATUS . RETRYING :
88- return `Retrying connection... (Attempt ${ connectionAttempts } /${ 5 } )` ;
88+ return `Retrying devnet connection... (Attempt ${ connectionAttempts } /${ 5 } )` ;
8989 case CONNECTION_STATUS . FAILED :
90- return connectionError || 'Failed to connect to Solana blockchain ' ;
90+ return connectionError || 'Failed to connect to Solana devnet ' ;
9191 case CONNECTION_STATUS . CONNECTED :
92- return 'Connected to Solana blockchain ' ;
92+ return 'Connected to Solana devnet ' ;
9393 default :
94- return 'Disconnected from blockchain ' ;
94+ return 'Disconnected from Solana devnet ' ;
9595 }
9696 } ;
9797
@@ -121,8 +121,8 @@ const OfferCreation = ({ onStartGuidedWorkflow }) => {
121121 return ;
122122 }
123123
124- if ( ! isSmartContractReady && ! devMode ) {
125- setError ( 'Smart contract connection is not ready. Please check your network connection and try again.' ) ;
124+ if ( ! isSmartContractReady && ! devnetBypass ) {
125+ setError ( 'Smart contract connection is not ready. Please check your devnet connection and try again.' ) ;
126126 return ;
127127 }
128128
@@ -472,9 +472,9 @@ const OfferCreation = ({ onStartGuidedWorkflow }) => {
472472 className = "create-offer-button disabled connection-issue"
473473 title = { getConnectionStatusMessage ( ) }
474474 >
475- { isConnectionConnecting && 'Connecting to Smart Contract ...' }
476- { isConnectionRetrying && `Retrying Connection (${ connectionAttempts } /5)` }
477- { isConnectionFailed && 'Smart Contract Connection Failed' }
475+ { isConnectionConnecting && 'Connecting to Solana Devnet ...' }
476+ { isConnectionRetrying && `Retrying Devnet Connection (${ connectionAttempts } /5)` }
477+ { isConnectionFailed && 'Solana Devnet Connection Failed' }
478478 </ button >
479479
480480 { ( isConnectionFailed || isConnectionRetrying ) && (
@@ -485,17 +485,17 @@ const OfferCreation = ({ onStartGuidedWorkflow }) => {
485485
486486 { isConnectionFailed && (
487487 < >
488- < p > This may be due to:</ p >
488+ < p > Unable to connect to the Solana devnet. This may be due to:</ p >
489489 < ul >
490490 < li > Network connectivity issues</ li >
491- < li > Solana RPC endpoint problems</ li >
491+ < li > Solana devnet RPC endpoint problems</ li >
492492 < li > Browser security restrictions (CORS)</ li >
493- < li > Temporary blockchain network issues</ li >
494- < li > Development environment limitations </ li >
493+ < li > Temporary devnet network issues</ li >
494+ < li > Firewall or proxy blocking devnet endpoints </ li >
495495 </ ul >
496496
497- < div className = "development -notice" >
498- < p > < strong > Development Note:</ strong > If you're testing the UI , you can continue without a live blockchain connection. Core functionality will be simulated.</ p >
497+ < div className = "devnet -notice" >
498+ < p > < strong > Note:</ strong > If devnet endpoints are temporarily unavailable , you can continue in simulation mode for interface testing. Smart contract features will be simulated.</ p >
499499 </ div >
500500 </ >
501501 ) }
@@ -522,15 +522,15 @@ const OfferCreation = ({ onStartGuidedWorkflow }) => {
522522 < button
523523 type = "button"
524524 onClick = { ( ) => {
525- // Enable development mode for UI testing
526- setDevMode ( true ) ;
525+ // Enable devnet bypass for UI testing when endpoints are unavailable
526+ setDevnetBypass ( true ) ;
527527 setError ( '' ) ;
528- console . log ( '[OfferCreation] Development mode enabled for UI testing' ) ;
528+ console . log ( '[OfferCreation] Devnet bypass enabled - simulating connection for UI testing' ) ;
529529 } }
530- className = "dev -bypass-button"
531- title = "Continue with UI testing (blockchain features disabled )"
530+ className = "devnet -bypass-button"
531+ title = "Continue with simulation mode (devnet features simulated )"
532532 >
533- Continue Without Blockchain (UI Test Mode)
533+ Continue Without Devnet (Simulation Mode)
534534 </ button >
535535 ) }
536536 </ div >
0 commit comments