@@ -7,13 +7,12 @@ import { makePublicClient } from './lib/passkeyClient'
77import { clearPasskey , loadPasskey , savePasskey } from './lib/storage'
88import { derivePasskeyAddress } from './lib/passkeyAddress'
99import { encodeExecute , PASSKEY_ACCOUNT_ABI } from './lib/passkeyAccount'
10- import { createPasskeyAccount , fundAccount , fetchBundlerLogs , sendUserOperation } from './lib/bundler'
10+ import { createPasskeyAccount , fetchBundlerLogs , sendUserOperation } from './lib/bundler'
1111import { defaultUserOp , getUserOpHash , toRpcUserOperation } from './lib/userop'
1212import { fromBase64Url } from './lib/base64'
1313import { getBundlerHealth , getRpcHealth } from './lib/health'
1414import { Sidebar } from './components/Sidebar'
1515import { Step } from './components/Step'
16- import { fundFromDevAccount } from './lib/faucet'
1716
1817const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'
1918const envRpc = import . meta. env . VITE_RPC_URL as string | undefined
@@ -51,7 +50,6 @@ function App() {
5150 const [ balance , setBalance ] = useState < string > ( '0' )
5251 const [ bundlerBalance , setBundlerBalance ] = useState < string > ( '0' )
5352 const [ bundlerLogs , setBundlerLogs ] = useState < BundlerLogEntry [ ] > ( [ ] )
54- const [ isFunding , setIsFunding ] = useState ( false )
5553 const [ isDeployed , setIsDeployed ] = useState ( false )
5654 const [ serviceHealth , setServiceHealth ] = useState < { rpc : ServiceHealth ; bundler : ServiceHealth } > ( {
5755 rpc : { status : 'checking' } ,
@@ -468,54 +466,27 @@ function App() {
468466
469467 < Step
470468 number = { 3 }
471- title = "Fund Account "
469+ title = "Funding (Optional) "
472470 description = {
473471 < >
474472 < p >
475- Smart contract accounts need gas to pay for transactions (unless using a Paymaster) .
473+ Bundler fee sponsorship is disabled .
476474 </ p >
477475 < p >
478- We'll use the Bundler's faucet to send some testnet NIBI to your new account .
476+ If this account needs native tokens for non-gasless flows, fund it directly from a wallet or CLI .
479477 </ p >
480478 </ >
481479 }
482480 isActive = { isDeployed }
483481 isCompleted = { BigInt ( balance ) > 0 }
484482 >
485- < button
486- onClick = { async ( ) => {
487- if ( ! fromAddress || fromAddress === ZERO_ADDRESS ) return
488- try {
489- setIsFunding ( true )
490- const desiredAmount = 100000000000000000n // 0.1 NIBI
491- const bundlerBal = BigInt ( bundlerBalance || '0' )
492- if ( bundlerBal < desiredAmount + 20000000000000000n ) {
493- updateStatus ( 'Bundler is underfunded. Top up the bundler signer first.' )
494- return
495- }
496-
497- updateStatus ( `Requesting transfer of ${ desiredAmount } wei from bundler dev account...` )
498- const txHash = await fundFromDevAccount ( config , fromAddress , desiredAmount )
499- updateStatus ( `Funded tx: ${ txHash } ` )
500- } catch ( err : any ) {
501- console . error ( err )
502- updateStatus ( err ?. message ?? 'Funding failed' )
503- } finally {
504- setIsFunding ( false )
505- }
506- } }
507- disabled = { isFunding || ! isDeployed }
508- >
509- { isFunding ? 'Funding…' : 'Fund from Dev Account' }
510- </ button >
511- { BigInt ( balance ) === 0n && (
512- < div style = { { marginTop : '12px' , fontSize : '14px' , color : '#64748b' } } >
513- < p > If the faucet fails, send NIBI manually to:</ p >
514- < code style = { { background : '#f1f5f9' , padding : '4px 8px' , borderRadius : '4px' , wordBreak : 'break-all' } } >
515- { fromAddress }
516- </ code >
517- </ div >
518- ) }
483+ < div style = { { marginTop : '12px' , fontSize : '14px' , color : '#64748b' } } >
484+ < p > No bundler funding RPC is available.</ p >
485+ < p > Fund manually if needed:</ p >
486+ < code style = { { background : '#f1f5f9' , padding : '4px 8px' , borderRadius : '4px' , wordBreak : 'break-all' } } >
487+ { fromAddress }
488+ </ code >
489+ </ div >
519490 </ Step >
520491
521492 < Step
@@ -534,7 +505,7 @@ function App() {
534505 </ ol >
535506 </ >
536507 }
537- isActive = { isDeployed && BigInt ( balance ) > 0 }
508+ isActive = { isDeployed }
538509 >
539510 < div className = "grid" >
540511 < div style = { { border : '1px solid #e2e8f0' , padding : '16px' , borderRadius : '8px' } } >
0 commit comments