This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
forked from LedgerHQ/clear-signing-erc7730-registry
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
137 additions
and
98 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { formatShortAddress } from "~/app/formatShortAddress"; | ||
import { UI } from "~/app/UI"; | ||
import { type Deploymnent, type PreviewData } from "~/types/PreviewData"; | ||
|
||
export const ContractInfo = ({ data }: { data: PreviewData }) => { | ||
return ( | ||
<div> | ||
<UI.HeadingField>Contract</UI.HeadingField> | ||
<div> | ||
{data.contract.name} | ||
{data.contract.deployments.map(({ address }: Deploymnent) => ( | ||
<span key={address}> | ||
{" "} | ||
( | ||
<UI.BlueLink | ||
href={`https://etherscan.io/address/${address}`} | ||
title={address} | ||
target="_blank" | ||
> | ||
{formatShortAddress(address)} | ||
</UI.BlueLink> | ||
) | ||
</span> | ||
))} | ||
</div> | ||
</div> | ||
); | ||
}; |
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 was deleted.
Oops, something went wrong.
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,32 @@ | ||
import { type Dispatch, type SetStateAction } from "react"; | ||
import { UI } from "~/app/UI"; | ||
import { type PreviewData } from "~/types/PreviewData"; | ||
|
||
export const SelectOperation = ({ | ||
data, | ||
selectedOperation, | ||
setSelectedOperation, | ||
}: { | ||
data: PreviewData; | ||
selectedOperation: string; | ||
setSelectedOperation: Dispatch<SetStateAction<string>>; | ||
}) => { | ||
const onChangeOperation = (e: React.ChangeEvent<HTMLSelectElement>) => { | ||
const selection = e.target.value; | ||
localStorage.setItem("selectedOperation", selection); | ||
setSelectedOperation(selection); | ||
}; | ||
|
||
return ( | ||
<div> | ||
<UI.HeadingField>Operation</UI.HeadingField> | ||
<UI.Select defaultValue={selectedOperation} onChange={onChangeOperation}> | ||
{data.operations.map(({ id, intent }) => ( | ||
<UI.Option key={`${data.contract.name}-${id}`} value={id}> | ||
{intent} | ||
</UI.Option> | ||
))} | ||
</UI.Select> | ||
</div> | ||
); | ||
}; |
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,12 @@ | ||
import { UI } from "~/app/UI"; | ||
|
||
export const SelectValues = () => { | ||
return ( | ||
<div> | ||
<UI.HeadingField>Preview with</UI.HeadingField> | ||
<UI.Select disabled onChange={() => null}> | ||
<UI.Option value="">Placeholder values</UI.Option> | ||
</UI.Select> | ||
</div> | ||
); | ||
}; |
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