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

update provider.tsx #944

Merged
merged 1 commit into from
Nov 12, 2024
Merged
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
111 changes: 63 additions & 48 deletions app/provider.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
"use client";
'use client';

import React from "react";
import { InjectedConnector } from "starknetkit/injected";
import { WebWalletConnector } from "starknetkit/webwallet";
import { ArgentMobileConnector } from "starknetkit/argentMobile";
import { Chain, mainnet, sepolia } from "@starknet-react/chains";
import React from 'react';
import { InjectedConnector } from 'starknetkit/injected';
import { WebWalletConnector } from 'starknetkit/webwallet';
import { ArgentMobileConnector } from 'starknetkit/argentMobile';
import { Chain, mainnet, sepolia } from '@starknet-react/chains';
import {
Connector,
StarknetConfig,
jsonRpcProvider,
} from "@starknet-react/core";
import { StarknetIdJsProvider } from "@context/StarknetIdJsProvider";
import { ThemeProvider, createTheme } from "@mui/material";
import { QuestsContextProvider } from "@context/QuestsProvider";
import { getCurrentNetwork } from "@utils/network";
import { constants } from "starknet";
import { PostHogProvider } from "posthog-js/react";
import posthog from "posthog-js";
import { NotificationProvider } from "@context/NotificationProvider";
import { LocalizationProvider } from "@mui/x-date-pickers";
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
} from '@starknet-react/core';
import { StarknetIdJsProvider } from '@context/StarknetIdJsProvider';
import { ThemeProvider, createTheme } from '@mui/material';
import { QuestsContextProvider } from '@context/QuestsProvider';
import { getCurrentNetwork } from '@utils/network';
import { constants } from 'starknet';
import { PostHogProvider } from 'posthog-js/react';
import posthog from 'posthog-js';
import { NotificationProvider } from '@context/NotificationProvider';
import { LocalizationProvider } from '@mui/x-date-pickers';
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';

// Traffic measures
if (typeof window !== "undefined") {
if (typeof window !== 'undefined') {
posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY as string, {
api_host: "https://app.posthog.com",
api_host: 'https://app.posthog.com',
session_recording: {
recordCrossOriginIframes: true,
},
Expand All @@ -34,31 +34,46 @@ if (typeof window !== "undefined") {
(window as any).posthog = posthog;
}

function isBitgetWalletInstalled() {
// Check if the Bitget wallet is available on the window object
return typeof window !== "undefined" && window.bitget !== undefined;
}

export const availableConnectors = [
new InjectedConnector({ options: { id: "braavos", name: "Braavos" } }),
new InjectedConnector({ options: { id: "argentX", name: "Argent X" } }),
new InjectedConnector({ options: { id: "bitkeep", name: "Bitget Wallet" } }),
new InjectedConnector({ options: { id: "okxwallet", name: "Okx Wallet" } }), // Added okxwallet
new InjectedConnector({
options: {
id: "bitkeep",
name: isBitgetWalletInstalled()
? "Bitget Wallet"
: "Install Bitget Wallet",
Copy link
Contributor

Choose a reason for hiding this comment

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

That will work for now but I think we need to completely reorganize the way we're managing wallets following app.starknet.id model

icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAMAAAAKE/YAAAAC8VBMVEUAAACS3/uZ5/rF4v7h/f9K6Pdi0vtTyvqnt/5T1PlH9fakpf/p//88/fXs//5G8vXy//5F8/Zj1vqvuv514PrI7v2J3/o6/PTE7/1A9fbU+/3Y+/1R0vo7/fXh//7G5/3l//6jov6k8fuxs/6ppP6/1f5O6Pfv//7n//+bsv4AAADy//7r//7l//45//RE/vTg//1I/vVB/vRL+vXb//09//RM/vXV/v19/vhQ/vXw+/5z/fc++vVh+feC/fii/fpf9PdQ1Pmxr/6y/vuM/fm8/vun/frB/vyt/vpq9vi3/vtZ9fdRyvq1s/5N4Ph4/vfj9v6tqv7e+f1q/PbK//xS3fhS6fdl+/bX2f6c/fmS/flw6fng7/7f4/66uP5O2fmB8Pla5/jQ//2H/fjT1P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mZSNGy7bWRqG7Y6t7g29pgf51k4Io5WtV8DQQ26Z/WaHg61thV1YNfeows16drCWxJHYzard7Wjd4EmLkfCXiN3YfSGBvcVIRu6FbWa2R5ezMZ+gc2SHz7mWRt2Ldqv7NlF1J4eY9tNOj8gLa3b2/TOc5vdwQ2r+YWmZTDBsq3HK6XZr77qfPRGdbzK7ve7YKM2tA1bxHqTHy3bQrmMlcVpviuV6yKai2SKRm1oZ2NWdYeiW3e2arBrH6fAG+BWQ7l0t6o86eiqWwOZ2W+Yo8ZMasYb1J6RFy1iL5pfKd3NHoKdol3NswmgpQ6KaDJzxl4ki+Tt0XtKdznYoCneOurnjlc1Okxan7eBHc2o21k8gwVZXia++2RnO9pv43ZjpvjADWrY/hRZfFQPd0jI8+862dl1UQ16h6kdjVrNZOb9bkZdFWf536xc9+SNo+bpFTWjpvCYIfE0p6x2czv7sfv/RbKPG7Tf5+8WtLCzxwxhA0ettbOtMORy6T+p/FBdLVrMR33SvPTh2aiWp5O/lebP+2/EPu+nFd1t+ROdiDEfYEU1aHp07j3l0n9fBbijpYim6ifCAc/7P4BdPm/u06DNjDqSQWsL5s77X0w4rVJ5aN7cuU8/vWABo+Y59gULFsyfi3aWuf8ADHnSl6eWnZwAAAAASUVORK5CYII=",
},
}),
new InjectedConnector({ options: { id: "okxwallet", name: "Okx Wallet" } }),

new WebWalletConnector({
url:
getCurrentNetwork() === "TESTNET"
? "https://web.hydrogen.argent47.net"
: "https://web.argent.xyz/",
}),
ArgentMobileConnector.init({
options: {dappName: "Starknet Quest",
url: process.env.NEXT_PUBLIC_APP_LINK as string,
chainId: constants.NetworkName.SN_MAIN,
icons: ["https://starknet.quest/visuals/starknetquestLogo.svg"],}
ArgentMobileConnector.init({
options: {
dappName: "Starknet Quest",
url: process.env.NEXT_PUBLIC_APP_LINK as string,
chainId: constants.NetworkName.SN_MAIN,
icons: ["https://starknet.quest/visuals/starknetquestLogo.svg"],
},
}),

new InjectedConnector({ options: { id: "keplr", name: "Keplr" } }),
];

export function Providers({ children }: { children: React.ReactNode }) {
const network = getCurrentNetwork();
const chains = [network === "TESTNET" ? sepolia : mainnet];
const chains = [network === 'TESTNET' ? sepolia : mainnet];
const provider = jsonRpcProvider({
// eslint-disable-next-line @typescript-eslint/no-unused-vars
rpc: (_chain: Chain) => ({
Expand All @@ -69,48 +84,48 @@ export function Providers({ children }: { children: React.ReactNode }) {
const theme = createTheme({
palette: {
primary: {
main: "#6affaf",
light: "#5ce3fe",
main: '#6affaf',
light: '#5ce3fe',
},
secondary: {
main: "#f4faff",
dark: "#eae0d5",
main: '#f4faff',
dark: '#eae0d5',
},
background: {
default: "#29282b",
default: '#29282b',
},
},
components: {
MuiTabs: {
styleOverrides: {
root: {
"& .MuiTabs-flexContainer": {
display: "flex",
flexDirection: "column", // For mobile versions
alignItems: "center",
["@media (min-width:768px)"]: {
flexDirection: "row", // For desktop versions
'& .MuiTabs-flexContainer': {
display: 'flex',
flexDirection: 'column', // For mobile versions
alignItems: 'center',
['@media (min-width:768px)']: {
flexDirection: 'row', // For desktop versions
},
},
},
// Overrides the styles for the selected tab indicator
indicator: {
backgroundColor: "transparent",
backgroundColor: 'transparent',
},
},
},
MuiTab: {
styleOverrides: {
// Overrides the styles for unselected tabs
root: {
color: "#E1DCEA", // Text color for unselected tabs
width: "100%",
["@media (min-width:768px)"]: {
width: "fit-content",
color: '#E1DCEA', // Text color for unselected tabs
width: '100%',
['@media (min-width:768px)']: {
width: 'fit-content',
},
"&.Mui-selected": {
color: "#000", // Text color for the selected tab
backgroundColor: "#fff", // Background of the selected tab
'&.Mui-selected': {
color: '#000', // Text color for the selected tab
backgroundColor: '#fff', // Background of the selected tab
},
},
},
Expand All @@ -130,12 +145,12 @@ export function Providers({ children }: { children: React.ReactNode }) {
<NotificationProvider>
<ThemeProvider theme={theme}>
<PostHogProvider client={posthog}>
<QuestsContextProvider>{children}</QuestsContextProvider>
<QuestsContextProvider>{children}</QuestsContextProvider>
</PostHogProvider>
</ThemeProvider>
</NotificationProvider>
</LocalizationProvider>
</StarknetIdJsProvider>
</StarknetConfig>
);
}
}