Skip to content

Commit

Permalink
rpcRrl -> rpcUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
gbarkhatov committed Dec 2, 2024
1 parent 15a485b commit a65d6af
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions src/app/context/tomo/TomoProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,44 @@ import { type PropsWithChildren } from "react";
import { getNetworkConfig } from "@/config/network.config";
import { bbnDevnet } from "@/config/wallet/babylon";

type ChainType = "bitcoin" | "cosmos";
type ThemeType = "dark" | "light";

export const TomoConnectionProvider = ({ children }: PropsWithChildren) => {
const { resolvedTheme } = useTheme();

const { mempoolApiUrl, network, networkName } = getNetworkConfig();

const bitcoinChain = {
id: 1,
name: networkName,
type: "bitcoin" as any,
type: "bitcoin" as ChainType,
network: network,
backendUrls: {
mempoolUrl: mempoolApiUrl + "/api/",
},
};

const cosmosChain = {
id: 2,
name: bbnDevnet.chainName,
type: "cosmos" as ChainType,
network: bbnDevnet.chainId,
modularData: bbnDevnet,
backendUrls: {
rpcUrl: bbnDevnet.rpc,
},
logo: bbnDevnet.chainSymbolImageUrl,
};

return (
<TomoContextProvider
bitcoinChains={[bitcoinChain]}
chainTypes={["bitcoin", "cosmos"]}
cosmosChains={[
{
id: 2,
name: bbnDevnet.chainName,
type: "cosmos",
network: bbnDevnet.chainId,
modularData: bbnDevnet,
backendUrls: {
rpcRrl: bbnDevnet.rpc,
},
logo: bbnDevnet.chainSymbolImageUrl,
},
]}
cosmosChains={[cosmosChain]}
style={{
rounded: "medium",
theme: resolvedTheme as "dark" | "light",
theme: resolvedTheme as ThemeType,
primaryColor: "#FF7C2A",
}}
>
Expand Down

0 comments on commit a65d6af

Please sign in to comment.