Skip to content

Conversation

@calintje
Copy link
Contributor

@calintje calintje commented Oct 9, 2025

Hi @boosik-sol, I think your implementation of the browser wallet integration is really nice and it works great!

I made a few changes to simplify the next app and update some features.

Changes

  • Use the swap example as the only example
    • Remove tick to sqrt price calculation
    • Remove fetching and enumerating positions by owner
  • Use Devnet exclusively
  • Hardcode pool address in favor of fetching based on mint ids
  • Hardcode swap amount and direction
    Screenshot 2025-10-09 at 23 36 05
  • Add logic to await confirmation of tx based on blockhash expiration (90 seconds)
    Screenshot 2025-10-09 at 23 36 30
  • Display Solscan link of transaction after tx confirmation
    Screenshot 2025-10-09 at 23 37 36

Copy link
Contributor

@boosik-sol boosik-sol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀🚀🚀

@calintje calintje merged commit 9070309 into boosik/next-tx-send-example Oct 15, 2025
1 check passed
@calintje calintje deleted the calintje/next-tx-send-example branch October 15, 2025 17:11
calintje added a commit that referenced this pull request Oct 21, 2025
… add Next.js swap example (#1076)

* draft: swap example

* add comments

* tailwind

* build fix

* changeset

* lint

* Fix build. Format.

* Update swap example (#1109)

* Update project README

* Base

* Enable env var

* Improve how tx-sender works with browser wallets and add tx-sender to example

* Fix tests

* Add changeset for tx-sender

* Format

* Replace custom TxMessage type with Solana-native CompilableTransactionMessage across all transaction building utilities. Narrow feePayer type from TransactionSigner to KeyPairSigner | NoopSigner and use built-in isKeyPairSigner helper. Conditionally apply maxRetries only when resendOnPoll is enabled to optimize RPC usage.

* Format

* Fix test

* Fmt. Fix yarn.lock.

* Reduced deps in nextjs example

---------

Co-authored-by: calintje <[email protected]>
Co-authored-by: Calin <[email protected]>
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.

3 participants