Skip to content

Commit

Permalink
Merge pull request #44 from gnosischain/dev
Browse files Browse the repository at this point in the history
fix: add brave wallet icon
  • Loading branch information
Wagalidoom authored Jun 17, 2024
2 parents 684a15d + 8153116 commit bf45da2
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ yarn-error.log*
next-env.d.ts

.env

hardhat/cache/**
hardhat/node_modules/**
14 changes: 11 additions & 3 deletions app/connect/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useEffect } from "react";
import { useRouter } from "next/navigation";
import { XMarkIcon } from "@heroicons/react/20/solid";
import Image from "next/image";
import { useAccount, useConnect } from "wagmi";
import { Connector, useAccount, useConnect } from "wagmi";
import Link from "next/link";

export default function Page() {
Expand All @@ -18,6 +18,14 @@ export default function Page() {
}
}, [account.status, router]);

const uniqueConnectors = connectors.reduce<Connector[]>((acc, connector) => {
const names = acc.map((c) => c.name);
if (!names.includes(connector.name)) {
acc.push(connector);
}
return acc;
}, []);

return (
<main className="flex h-screen w-screen bg-[#000000b3] backdrop-blur-xl flex-col items-center justify-center">
<div className="w-full lg:w-[590px] h-[550px] bg-[#F0EBDE] p-6 rounded-3xl flex gap-y-4 flex-col justify-start items-center">
Expand All @@ -28,10 +36,10 @@ export default function Page() {
</div>
<p className="text-2xl lg:text-3xl text-black font-bold mt-8 w-1/2 text-center">Choose your preferred wallet</p>
<div className="w-full flex flex-col divide-slate-700 divide-y mt-8 overflow-y-auto">
{connectors.map((connector, index) => {
{uniqueConnectors.map((connector, index) => {
return (
<div className="flex w-full justify-between items-center text-black hover:bg-[#E8E1CF] py-4 p-2 first:rounded-t-lg last:rounded-b-lg" key={connector.uid} onClick={() => connect({ connector })}>
{connector.name} <Image src={"./"+connector.id+".png"} alt={connector.id} width={48} height={24} />
{connector.name} <Image src={"./" + connector.id + ".png"} alt={connector.id} width={48} height={24} />
</div>
);
})}
Expand Down
68 changes: 68 additions & 0 deletions playwright-report/index.html

Large diffs are not rendered by default.

Binary file added public/com.brave.wallet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions test-results/.last-run.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"status": "failed",
"failedTests": [
"15024d7fd7781830e722-877d98d4d64dba87de19"
]
}

0 comments on commit bf45da2

Please sign in to comment.