Skip to content

Commit

Permalink
Support Safe
Browse files Browse the repository at this point in the history
  • Loading branch information
JayJay1024 committed Jun 20, 2024
1 parent 93aeefc commit 2b7aa59
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "AssetHub Bridge - Darwinia",
"description": "Assets cross-chain between Darwinia and AssetHub.",
"icons": [{ "src": "favicon.ico", "sizes": "any" }]
}
1 change: 1 addition & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const inter = Inter({ subsets: ["latin"] });
export const metadata: Metadata = {
title: "AssetHub Bridge - Darwinia",
description: "Assets cross-chain between Darwinia and AssetHub.",
manifest: "/manifest.json",
};

export default function RootLayout({ children }: { children: React.ReactNode }) {
Expand Down
7 changes: 5 additions & 2 deletions src/providers/rainbow-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

import "@rainbow-me/rainbowkit/styles.css";

import { darkTheme, getDefaultWallets, RainbowKitProvider } from "@rainbow-me/rainbowkit";
import { connectorsForWallets, darkTheme, getDefaultWallets, RainbowKitProvider } from "@rainbow-me/rainbowkit";
import { configureChains, createConfig, WagmiConfig } from "wagmi";
import { publicProvider } from "wagmi/providers/public";
import { PropsWithChildren } from "react";
import { darwiniaChain } from "@/config/chains";
import { APP_NAME } from "@/config";
import { safeWallet } from "@rainbow-me/rainbowkit/wallets";

const projectId = process.env.NEXT_PUBLIC_WALLET_CONNECT_ID || "";
const appName = APP_NAME;
Expand All @@ -17,7 +18,9 @@ const { chains, publicClient } = configureChains(
[publicProvider()],
);

const { connectors } = getDefaultWallets({ appName, projectId, chains });
const { wallets } = getDefaultWallets({ appName, projectId, chains });

const connectors = connectorsForWallets([...wallets, { groupName: "More", wallets: [safeWallet({ chains })] }]);

const wagmiConfig = createConfig({
autoConnect: true,
Expand Down

0 comments on commit 2b7aa59

Please sign in to comment.