-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
enhancementNew feature or requestNew feature or requeststellarStellar Ecosystem Related IssuesStellar Ecosystem Related Issues
Description
Enhance wallet gating to be adapter-led and chain-agnostic
Summary
Currently, the Builder UI blocks transaction execution if no wallet is connected, regardless of execution method. This is correct for EOA flows, but unnecessarily strict for relayer flows:
- EVM relayer: does not require a connected wallet.
- Stellar relayer: requires a wallet only when feeBump is enabled (inner tx signing); otherwise not required.
Problem
Two places enforce a hard wallet requirement:
packages/renderer/src/components/transaction/TransactionExecuteButton.tsxdisables the button when!isWalletConnected.packages/renderer/src/components/TransactionForm.tsxaborts submission when!isWalletConnected.
This breaks the principle of keeping chain-specific behavior within adapters and prevents valid relayer flows without a wallet.
Proposal
Introduce adapter-led runtime capability: let adapters indicate when a connected wallet is required for the current ExecutionConfig.
-
Add optional contract adapter method:
requiresConnectedWallet(executionConfig: ExecutionConfig): boolean- Default:
truefor safety when not implemented. - EVM adapter: returns
executionConfig.method === "eoa". - Stellar adapter: returns
executionConfig.method === "eoa" || (executionConfig.method === "relayer" && !!transactionOptions?.feeBump).
- Default:
-
Update renderer gating:
TransactionFormsubmission guard usesadapter.requiresConnectedWallet(executionConfig).TransactionExecuteButtondisabled state uses the same boolean, passed down as a prop.
-
Keep existing relayer API key validation unchanged.
Acceptance Criteria
- Executing via EVM relayer without wallet is allowed (with valid API key).
- Executing via Stellar relayer without wallet is allowed when
feeBumpis false; blocked whenfeeBumpis true. - Executing via EOA remains blocked without wallet.
- No chain-specific logic lives in the renderer; decisions come from adapters.
- Types package updated to include the optional method and lint rule
@no-extra-adapter-methods.cjskept in sync.
Notes
- This preserves the chain-agnostic and adapter-led architecture.
- Backward compatible: adapters not implementing the method default to current behavior (require wallet).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requeststellarStellar Ecosystem Related IssuesStellar Ecosystem Related Issues