Skip to content

Commit

Permalink
fix: lengthen keys in ViewKeys component
Browse files Browse the repository at this point in the history
  • Loading branch information
jurevans committed Aug 20, 2024
1 parent 4488db2 commit ccd1598
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions apps/extension/src/App/Accounts/ViewAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export const ViewAccount = (): JSX.Element => {
publicKeyAddress={parentAccount.publicKey ?? ""}
transparentAccountAddress={transparentAddress}
shieldedAccountAddress={shieldedAddress}
trimCharacters={21}
/>
</Stack>
<ActionButton size="md" onClick={() => navigate(-1)}>
Expand Down
1 change: 1 addition & 0 deletions apps/extension/src/Setup/Common/Completion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export const Completion: React.FC<Props> = (props) => {
publicKeyAddress={publicKeyAddress}
transparentAccountAddress={transparentAccountAddress}
shieldedAccountAddress={shieldedAccountAddress}
trimCharacters={35}
footer={
<ActionButton
size="lg"
Expand Down
14 changes: 11 additions & 3 deletions packages/components/src/ViewKeys.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ type ViewKeysProps = {
shieldedAccountAddress?: string;
viewingKeys?: string;
footer?: React.ReactNode;
trimCharacters?: number;
};

export const ViewKeys = ({
Expand All @@ -17,6 +18,7 @@ export const ViewKeys = ({
shieldedAccountAddress,
viewingKeys,
footer,
trimCharacters = 16,
}: ViewKeysProps): JSX.Element => {
return (
<Stack
Expand All @@ -29,7 +31,10 @@ export const ViewKeys = ({
<Input
label="Your Transparent Address"
variant="ReadOnlyCopy"
valueToDisplay={shortenAddress(transparentAccountAddress, 16)}
valueToDisplay={shortenAddress(
transparentAccountAddress,
trimCharacters
)}
value={transparentAccountAddress}
theme={"primary"}
/>
Expand All @@ -38,7 +43,7 @@ export const ViewKeys = ({
<Input
label="Public Key"
variant="ReadOnlyCopy"
valueToDisplay={shortenAddress(publicKeyAddress, 16)}
valueToDisplay={shortenAddress(publicKeyAddress, trimCharacters)}
value={publicKeyAddress}
theme={"primary"}
/>
Expand All @@ -48,7 +53,10 @@ export const ViewKeys = ({
label="Your Shielded Address"
variant="ReadOnlyCopy"
readOnly={true}
valueToDisplay={shortenAddress(shieldedAccountAddress, 16)}
valueToDisplay={shortenAddress(
shieldedAccountAddress,
trimCharacters
)}
value={shieldedAccountAddress}
theme={"secondary"}
/>
Expand Down

0 comments on commit ccd1598

Please sign in to comment.