-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat/746 - Updates for Ledger HW (shielded keys) (#1471)
* feat: bump to latest Ledger package * feat: begin hooking up shielded keys import * feat: split proof-gen and viewing key calls, fix paths * fix: fix tests * feat: stealing Mateusz code, show payment address in confirmation * feat: validate semver of installed app for Zip32 * feat: begin implementing import approval steps
- Loading branch information
1 parent
035c2f6
commit e5040c2
Showing
23 changed files
with
388 additions
and
165 deletions.
There are no files selected for viewing
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
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
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
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
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
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 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 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 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.