Skip to content

Commit

Permalink
add controller identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
RedBeardEth committed Dec 5, 2024
1 parent 46f734c commit 12363f0
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions apps/nextjs/src/providers/Web3Providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,21 @@ const starkProvider = env.NEXT_PUBLIC_BLAST_API
: starkPublicProvider();

const isTestnet = env.NEXT_PUBLIC_IS_TESTNET === "true";
const theme = "eternum";
const slot = "eternum-rc1-1";
const namespace = "eternum";
const colorMode = "dark";

const cartridgeController = new ControllerConnector({
policies: [],
rpc:
"https://api.cartridge.gg/x/starknet/" +
(isTestnet ? "sepolia" : "mainnet"),
theme,
colorMode,
namespace,
slot,
});

const starkConnectors = isInArgentMobileAppBrowser()
? [
Expand All @@ -50,11 +65,7 @@ const starkConnectors = isInArgentMobileAppBrowser()
}),
]
: [
new ControllerConnector({
rpc:
"https://api.cartridge.gg/x/starknet/" +
(isTestnet ? "sepolia" : "mainnet"),
}),
cartridgeController,
new InjectedConnector({ options: { id: "braavos", name: "Braavos" } }),
new InjectedConnector({ options: { id: "argentX", name: "Argent X" } }),
ArgentMobileConnector.init({
Expand All @@ -71,7 +82,7 @@ const starkConnectors = isInArgentMobileAppBrowser()
}),
];

const theme = darkTheme({
const reservoirTheme = darkTheme({
headlineFont: "Sans Serif",
font: "Serif",
primaryColor: "#323aa8",
Expand Down Expand Up @@ -127,7 +138,7 @@ export function Web3Providers({ children }: { children: ReactElement }) {
},
],
}}
theme={theme}
theme={reservoirTheme}
>
{children}
</ReservoirKitProvider>
Expand Down

0 comments on commit 12363f0

Please sign in to comment.