Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add keplr wallet #899

Merged
merged 3 commits into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions components/UI/modalWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import CopyIcon from "./iconsComponents/icons/copyIcon";
import DoneIcon from "./iconsComponents/icons/doneIcon";
import { useNotificationManager } from "../../hooks/useNotificationManager";
import { useCopyToClipboard } from "@/hooks/useCopy";
import { getConnectorIcon } from "@/utils/connectorWrapper";

type ModalWalletProps = {
closeModal: () => void;
Expand Down Expand Up @@ -62,16 +63,14 @@ const ModalWallet: FunctionComponent<ModalWalletProps> = ({
</button>
<div className={styles.menu_title}>
<div className={styles.menu_title}>
{connector && connector.id === "braavos" ? (
{connector && (
<img
width={"25px"}
src="/braavos/braavosLogo.svg"
alt="braavos logo"
src={getConnectorIcon(connector.id)}
width={25}
height={25}
alt="connector logo"
Marchand-Nicolas marked this conversation as resolved.
Show resolved Hide resolved
/>
) : (
<ArgentIcon color={"#f36a3d"} width={"25px"} />
)}

<p className="ml-2">Connected with &nbsp;{domain}&nbsp;</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion hooks/useBalances.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function useBalances(address?: string) {
functionName: "aggregate",
args: callData,
watch: true,
blockIdentifier: BlockTag.pending,
blockIdentifier: BlockTag.PENDING,
});

useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion hooks/useNeedAllowances.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function useNeedsAllowances(
functionName: "aggregate",
args: callData,
watch: true,
blockIdentifier: BlockTag.pending,
blockIdentifier: BlockTag.PENDING,
});

useEffect(() => {
Expand Down
20,097 changes: 7,931 additions & 12,166 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@solana/wallet-adapter-wallets": "^0.19.23",
"@solana/web3.js": "^1.87.6",
"@starknet-react/chains": "^3.0.0",
"@starknet-react/core": "^3.0.1",
"@starknet-react/core": "^3.0.3",
"@vercel/analytics": "^0.1.5",
"@walnuthq/sdk": "^1.1.10",
"axios": "^1.4.0",
Expand All @@ -32,7 +32,7 @@
"dotenv": "^16.3.1",
"eslint-config-next": "^13.4.7",
"ethers": "^6.12.1",
"get-starknet-core": "^3.3.0",
"get-starknet-core": "^4.0.0",
"jotai": "^2.5.0",
"lottie-react": "^2.4.0",
"mongodb": "^4.12.1",
Expand All @@ -45,9 +45,9 @@
"react-dom": "^18.2.0",
"react-icons": "^4.4.0",
"react-loader-spinner": "5.4.5",
"starknet": "6.9.0",
"starknet": "^6.11.0",
"starknetid.js": "^4.0.1",
"starknetkit": "^2.3.2",
"starknetkit": "^2.3.0",
"tldts": "^6.1.20",
"twitter-api-sdk": "^1.2.1"
},
Expand Down
1 change: 1 addition & 0 deletions public/visuals/kepler_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions utils/connectorWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const getConnectors = () => {
icons: ["https://app.starknet.id/visuals/StarknetIdLogo.svg"],
},
}),
new InjectedConnector({ options: { id: "keplr" } }),
new WebWalletConnector({
url: "https://web.argent.xyz/",
}),
Expand Down Expand Up @@ -162,4 +163,16 @@ const wallets = [
},
website: "https://www.okx.com/",
},
{
id: "keplr",
name: "Keplr Wallet",
icon: "/visuals/kepler_logo.svg",
Copy link
Contributor

@coderabbitai coderabbitai bot Oct 23, 2024

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix typo in icon path: "kepler" should be "keplr".

The icon path contains a typo that could cause the image to fail loading.

-    icon: "/visuals/kepler_logo.svg",
+    icon: "/visuals/keplr_logo.svg",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
icon: "/visuals/kepler_logo.svg",
icon: "/visuals/keplr_logo.svg",

Copy link
Collaborator

Choose a reason for hiding this comment

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

En vrai c'est pas fatal mais en effet Rabbit a raison le nom du wallet sur l'image est pas bon @fricoben

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

downloads: {
chrome:
"https://chromewebstore.google.com/detail/keplr/dmkamcknogkgcdfhhbddcghachkejeap",
firefox: "https://addons.mozilla.org/en-US/firefox/addon/keplr/",
edge: "https://microsoftedge.microsoft.com/addons/detail/keplr/ocodgmmffbkkeecmadcijjhkmeohinei",
},
website: "https://www.keplr.app/",
},
];