-
Notifications
You must be signed in to change notification settings - Fork 422
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
feat: Add support for the Ledger Generic App #1408
Conversation
setError: (value: string | null) => void; | ||
} | ||
|
||
function getMetadataProof (chain: Chain, payload: SignerPayloadJSON) { | ||
const m = chain.definition.rawMetadata || '0x00'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should rework this little portion, when no metadata is present there should be some sort of error that is thrown, and logged on the screen.
@@ -102,7 +106,7 @@ export default function useLedger (genesis?: string | null, accountIndex = 0, ad | |||
setError(null); | |||
setWarning(null); | |||
|
|||
ledger.getAddress(false, accountIndex, addressOffset) | |||
ledger.getAddress(chainInfo?.ss58Format || 0, false, accountIndex, addressOffset) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can do an assert
here - We just want to make sure the ss58 is always for certain what is present in the ss58 format and can't resolve to 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are 2 little nits I have - But I also think we should have some way to warn about no metadata being present when users are using their ledger account
Also we should consider what the workflow is also going to look like for the migration app. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, great job - this will be followed up with support for the Migration App.
@TarikGul Currently you have to add a new account for every chain, even though the derivation paths are the same, so it's kind of annoying. We could eventually add a "Allow use on any network" option like when creating via mnemonic. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
It adds
signsWithMetadata
to support the new Polkadot Generic App. It also adds the support to send thesignedTransaction
back from the extension to the dApp.Now the option to upload the metadata to the extension also uploads the
rawMetadata
as aHexString
, that's necessary forCheckMetadataHash
. The button also remains disabled until therawMetadata
is retrieved from the endpoint, in order to make sure the upload is done correctly.This replaces #1397 .
Needs to be ran alongside #10778, because that has the support to uploading the metadata to the extension.
EDIT: