Skip to content

Fix external wallet connector error, gas sponsorship investigation - #116

Merged
stackdapp-dev merged 5 commits into
mainfrom
develop
Mar 26, 2026
Merged

stackdapp-dev merged 5 commits into
mainfrom
develop

Conversation

@stackdapp-dev

@stackdapp-dev stackdapp-dev commented Mar 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Fix "Unknown connector error" on external wallets (Rabby, MetaMask, Fireblocks): Removed gas fee overrides (type: 2, maxFeePerGas, maxPriorityFeePerGas) from Privy's sendTransaction for external wallets — these wallets handle their own gas estimation, and passing overrides through Privy's connector caused failures
  • Gas sponsorship investigation: Added integration tests proving that forceNoSponsor is only needed for supply/supplyAndBorrow (which require ERC-20 approval), not for pure borrows, repays, or withdrawals
  • Default "Hide Alpha Features" to off: XAUT positions now visible by default for all users
  • Simulator improvements: Default collateral to 1, reorder borrow field above collateral inputs, fix formatAmount RangeError

Test plan

  • All 1634 unit tests pass (0 regressions)
  • Integration tests: 4 Fluid vault operations (supply, borrow, repay, withdraw) confirmed on Ethereum mainnet with real tx hashes
  • Manual browser test: Add Collateral via Rabby wallet succeeded after gas override fix
  • Anvil fork tests: Pure borrow simulation passes without approval (proves sponsorship can work)
  • Anvil fork tests: supplyAndBorrow simulation fails without approval (confirms forceNoSponsor is correct)

🤖 Generated with Claude Code

sd and others added 2 commits March 16, 2026 22:25
…sable on load

Previously sandboxCollateral initialized to "" (parsed as 0), making
maxBorrow=0 and disabling the slider until the user manually entered a value.
Now defaults to "1" for both WBTC and XAUT, enabling immediate slider interaction.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…lt-collateral

feat(simulator): default collateral to 1 for usable slider on load
@vercel

vercel Bot commented Mar 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stackd-web Ready Ready Preview, Comment Mar 26, 2026 4:16am

stackdapp-dev and others added 2 commits March 26, 2026 08:26
… wallets

- Remove type:2 and maxFeePerGas/maxPriorityFeePerGas gas overrides from
  Privy sendTransaction for external wallets (Rabby, MetaMask, Fireblocks).
  External wallets handle their own gas estimation; passing overrides through
  Privy's connector caused "Unknown connector error".
- Remove boostGasFees import (no longer used in Web3Provider).
- Default "Hide Alpha Features" to disabled so XAUT positions are visible.
- Add integration test infrastructure (vitest.integration.config.ts) with
  Anvil fork + live mainnet test suites for Fluid vault operations.
- Add fluid-sponsorship-investigation tests proving:
  - Pure borrows do NOT need forceNoSponsor (paymaster simulation passes)
  - supplyAndBorrow DOES need forceNoSponsor (approval simulation fails)
- Add fluid-operations tests executing all 4 vault operations on mainnet:
  supply, borrow, repay, withdraw (all confirmed on Etherscan).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@stackdapp-dev stackdapp-dev changed the title Release: simulator UX improvements and format fix Fix external wallet connector error, gas sponsorship investigation Mar 26, 2026
…ides

- Update developerMode tests to expect default false (alpha features visible)
- Update gas boost tests to verify gas overrides are NOT passed to Privy
- Fix catch fallback in developerMode to return false consistently
- Exclude test/integration/ from default vitest run (needs Anvil)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@stackdapp-dev
stackdapp-dev merged commit 563c2a7 into main Mar 26, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview — c989ae5e Deployed Mar 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants