feat: wallet connect and escrow data layer for #316#334
Closed
Benjtalkshow wants to merge 1 commit into
Closed
Conversation
Add Stellar wallet connection using the Stellar Wallets Kit. A user can connect an existing external wallet such as Freighter, xBull, Albedo, Lobstr, Rabet, or Hana. The kit opens a modal, the user picks a wallet, and it returns the wallet address. That address is the signer the escrow endpoints need. This flow only connects a wallet. It does not create one. Add the data layer for the two lists. This covers the indexer types from the Trustless Work docs, a helper that derives the status from flags and balance, adapters that map an escrow into the order and transaction shapes, a mock client, and a useEscrows hook with page based pagination. Place the connect button on the orders page and the transactions page. The pages still use mock data. The real call to get-escrows-by-signer is not wired yet. The whole feature sits behind one function so the swap stays small once the API client is ready.
Contributor
Author
|
Superseded by a renamed branch and new PR: #335 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
This work is for issue #316.
What this adds
Wallet connection using the Stellar Wallets Kit. A user can connect an existing external Stellar wallet such as Freighter, xBull, Albedo, Lobstr, Rabet, or Hana. The kit opens a modal, the user picks a wallet, and it returns the wallet address. That address is the signer the escrow endpoints need. This flow only connects a wallet. It does not create one.
The data layer for the two lists. This covers the escrow types from the Trustless Work docs, a helper that derives the status from flags and balance, adapters that map an escrow into the order and transaction shapes, a mock client, and a
useEscrowshook with page based pagination.The connect button now shows on the orders page and the transactions page.
What is not done yet
The pages still use mock data. The real call to
get-escrows-by-signeris not wired yet. The whole feature sits behind one function, so the swap stays small once the API client is ready.Blocked on
I am waiting for the following pull requests to be merged before I proceed with the page wiring:
get-escrows-by-signermethod does not exist in the current client, so I cannot wire the real call until this lands.Notes
This branch mounts the wallet provider in
app/layout.tsx. Issue #323 also plans to edit the layout, so please review the merge order.