-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connect to account with direct navigation parameters #902
Merged
Conversation
This file contains 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
To ensure users are directed to the correct LiveApp page for specific actions (such as staking/unstaking) triggered from Ledger Live, the Acre dapp must implement URL parameters to support direct navigation. We want to connect to the account passed via URL. The Ledger Live App passes the `accountId` parameter in URL when redirecting to Acre dapp. This parameter has the following pattern `js:2:bitcoin_testnet:<xpub>:<address_type>`. To connect to a given account we need to get the extended public key from this parameter. To connect to a given account by xpub we define the new option in the provider: `tryConnectToAccountByXpub`. The Ledger Live Bitcoin provider will try to find this account and connect.
Add the `bitcoin.getXpub` method to the `permissions` list. We use this method to connect to an account by `xpub`.
✅ Deploy Preview for acre-dapp-testnet ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for acre-dapp ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
nkuba
reviewed
Nov 27, 2024
dapp/src/utils/orangekit/ledger-live/tests/bitcoin-provider.test.ts
Outdated
Show resolved
Hide resolved
nkuba
approved these changes
Nov 27, 2024
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.
Closes: AENG-51
To ensure users are directed to the correct LiveApp page for specific actions (such as staking/unstaking) triggered from Ledger Live, the Acre dapp must implement URL parameters to support direct navigation.
We want to connect to the account passed via URL. The Ledger Live App passes the
accountId
parameter in URL when redirecting to Acre dapp. This parameter has the following patternjs:2:bitcoin_testnet:<xpub>:<address_type>
. To connect to a given account we need to get the extended public key from this parameter.To connect to a given account by xpub we define the new option in the provider:
tryConnectToAccountByXpub
. The Ledger Live Bitcoin provider will try to find this account and connect.