Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob-six committed Jan 15, 2024
2 parents 9b0c007 + e8a6e7d commit c27cc94
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
14 changes: 11 additions & 3 deletions app/gastap/components/Modals/ClaimModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ const ClaimModalBody = ({ chain }: { chain: Chain }) => {
const ClaimModal = () => {
const { closeClaimModal, activeChain, isNonEvmActive } = useGasTapContext();
const { brightidModalStatus } = useGlobalContext();
const { userProfile } = useUserProfileContext();

const isOpen = useMemo(() => {
return !!activeChain && brightidModalStatus === BrightIdModalState.CLOSED;
Expand All @@ -141,9 +142,13 @@ const ClaimModal = () => {
return (
<>
<Modal
title={`Claim ${formatWeiBalance(activeChain.maxClaimAmount)} ${
activeChain.symbol
}`}
title={
userProfile?.isMeetVerified
? `Claim ${formatWeiBalance(activeChain.maxClaimAmount)} ${
activeChain.symbol
}`
: "Connect BrightID"
}
size="small"
closeModalHandler={closeClaimModal}
isOpen={isOpen}
Expand All @@ -152,6 +157,9 @@ const ClaimModal = () => {
className="claim-modal-wrapper flex flex-col items-center justify-center pt-5"
data-testid={`chain-claim-modal-${activeChain.pk}`}
>
<div className="my-5 font-semibold text-error text-sm">
You need to connect your brightID first before claiming gas
</div>
<ClaimModalBody chain={activeChain} />
</div>
</Modal>
Expand Down
6 changes: 3 additions & 3 deletions utils/hooks/generateKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ const useGenerateKeys = (): {
const address = wallet.address;

// Store the keys in localStorage
localStorage.setItem("privateKey", privateKey);
localStorage.setItem("publicKey", publicKey);
localStorage.setItem("address", address);
// localStorage.setItem("privateKey", privateKey);
// localStorage.setItem("publicKey", publicKey);
// localStorage.setItem("address", address);

// Update the state with the keys
setKeys({ privateKey, publicKey, address });
Expand Down

1 comment on commit c27cc94

@vercel
Copy link

@vercel vercel bot commented on c27cc94 Jan 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.