-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: initial signing work for ledger
- Loading branch information
1 parent
831989d
commit 5c31cd4
Showing
89 changed files
with
1,183 additions
and
583 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
{ | ||
"prettier.documentSelectors": ["src/**/*.{ts,tsx}", "*.{js,json}"], | ||
"vitest.include": ["src/**/*.spec.ts"], | ||
"githubPullRequests.ignoredPullRequestBranches": ["dev"], | ||
"editor.folding": false | ||
"githubPullRequests.ignoredPullRequestBranches": ["dev"] | ||
} |
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
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 |
---|---|---|
@@ -1,22 +1,10 @@ | ||
import { memo } from 'react'; | ||
|
||
import { BoxProps } from '@stacks/ui'; | ||
import { styled } from 'leather-styles/jsx'; | ||
|
||
import { useAccountDisplayName } from '@app/common/hooks/account/use-account-names'; | ||
import { StacksAccount } from '@app/store/accounts/blockchain/stacks/stacks-account.models'; | ||
|
||
interface AccountNameLayoutProps { | ||
children: React.ReactNode; | ||
} | ||
export const AccountNameLayout = memo(({ children }: AccountNameLayoutProps) => ( | ||
<styled.p textStyle="label.01">{children}</styled.p> | ||
)); | ||
|
||
interface AccountNameProps extends BoxProps { | ||
account: StacksAccount; | ||
} | ||
export const AccountName = memo(({ account }: AccountNameProps) => { | ||
const name = useAccountDisplayName(account); | ||
return <AccountNameLayout>{name}</AccountNameLayout>; | ||
}); |
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,30 @@ | ||
import { styled } from 'leather-styles/jsx'; | ||
|
||
const defaultSize = '20px'; | ||
|
||
interface AnimatedTickProps { | ||
size?: string; | ||
} | ||
export function AnimatedTick({ size = defaultSize }: AnimatedTickProps) { | ||
return ( | ||
<styled.svg | ||
preserveAspectRatio="xMidYMid meet" | ||
width={size} | ||
height={size} | ||
viewBox="0 0 400 400" | ||
> | ||
<styled.polyline | ||
fill="none" | ||
stroke="currentColor" | ||
strokeWidth="24" | ||
points="88,214 173,284 304,138" | ||
strokeDasharray="350" | ||
strokeDashoffset="350" | ||
transformOrigin="center" | ||
style={{ scale: '1.5', transform: 'translateY(-10px)' }} | ||
animation="animatedTick .8s ease-out" | ||
animationFillMode="forwards" | ||
/> | ||
</styled.svg> | ||
); | ||
} |
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,14 @@ | ||
import { BitcoinAccount } from '@shared/crypto/bitcoin/bitcoin.utils'; | ||
|
||
import { useCurrentNativeSegwitAccount } from '@app/store/accounts/blockchain/bitcoin/native-segwit-account.hooks'; | ||
import { useCurrentTaprootAccount } from '@app/store/accounts/blockchain/bitcoin/taproot-account.hooks'; | ||
|
||
interface CurrentBitcoinAccountLoaderProps { | ||
children: (data: { nativeSegwit: BitcoinAccount; taproot: BitcoinAccount }) => React.ReactNode; | ||
} | ||
export function CurrentBitcoinAccountLoader({ children }: CurrentBitcoinAccountLoaderProps) { | ||
const nativeSegwit = useCurrentNativeSegwitAccount(); | ||
const taproot = useCurrentTaprootAccount(); | ||
if (!taproot || !nativeSegwit) return null; | ||
return children({ nativeSegwit, taproot }); | ||
} |
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
Oops, something went wrong.