-
Notifications
You must be signed in to change notification settings - Fork 128
feat/746 - Updates for Ledger HW (shielded keys) #1471
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
Merged
jurevans
merged 7 commits into
feat/ledger-masp-integration-branch
from
feat/746-ledger-shielded-keys
Jan 21, 2025
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
abc4894
feat: bump to latest Ledger package
jurevans 2b8be9f
feat: begin hooking up shielded keys import
jurevans 2e6b0ec
feat: split proof-gen and viewing key calls, fix paths
jurevans 7ffb2e4
fix: fix tests
jurevans 88d52a8
feat: stealing Mateusz code, show payment address in confirmation
jurevans 20eca45
feat: validate semver of installed app for Zip32
jurevans c0308b4
feat: begin implementing import approval steps
jurevans File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { Heading, ProgressIndicator, Stack } from "@namada/components"; | ||
|
||
type LedgerApprovalStepProps = { | ||
currentApprovalStep: number; | ||
}; | ||
|
||
export const LedgerApprovalStep = ({ | ||
currentApprovalStep, | ||
}: LedgerApprovalStepProps): JSX.Element => { | ||
const stepText = [ | ||
"Deriving Bip44 public key...", | ||
"Deriving Zip32 Viewing Key... This could take a few seconds!", | ||
"Deriving Zip32 Proof-Generation Key... This could take a few seconds!", | ||
]; | ||
|
||
// Ensure that steps are within stepText limits | ||
const totalSteps = stepText.length; | ||
const currentStep = Math.min(Math.max(currentApprovalStep, 1), totalSteps); | ||
|
||
return ( | ||
<Stack gap={1} className="bg-black w-full p-4 rounded-md min-h-[240px]"> | ||
<Stack direction="horizontal" className="flex"> | ||
<span className="flex-none"> | ||
<ProgressIndicator | ||
keyName="ledger-import" | ||
totalSteps={totalSteps} | ||
currentStep={currentStep} | ||
/> | ||
</span> | ||
<span className="flex-1 text-white font-medium text-right"> | ||
Approval {currentStep}/{totalSteps} | ||
</span> | ||
</Stack> | ||
<Heading | ||
level="h2" | ||
className="text-base text-center text-white font-medium" | ||
> | ||
Please wait for Ledger to respond! | ||
</Heading> | ||
<p className="font-medium text-yellow text-base text-center px-12"> | ||
{stepText[currentStep - 1]} | ||
</p> | ||
</Stack> | ||
); | ||
}; |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
was just simplifying here - we do not need to track the whole shielded account, only the payment address to display in confirmation