+
+
+
👛
+
Connect your wallet
+
+
+
+
+
+
+
+ {@html svgString}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/config.json b/src/config.json
index 59301e616..cdd496e0a 100644
--- a/src/config.json
+++ b/src/config.json
@@ -48,6 +48,7 @@
"tokens": []
},
"alchemy": { "key": "cQFlLK8EokIGlJhd_soImwEyUoC7Ec8r" },
+ "walletConnect": { "bridge": "https://radicle.bridge.walletconnect.org" },
"ceramic": { "api": "https://ceramic-clay.3boxlabs.com" },
"radicle": { "api": "http://0.0.0.0:8888" },
"ipfs": { "gateway": "https://ipfs.io/ipfs/" },
diff --git a/src/config.ts b/src/config.ts
index b26f86de2..13002bb61 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -1,9 +1,13 @@
+import { writable } from "svelte/store";
+import type { Writable } from "svelte/store";
import { ethers } from "ethers";
import type { TypedDataSigner } from '@ethersproject/abstract-signer';
import SafeServiceClient from "@gnosis.pm/safe-service-client";
import CeramicClient from "@ceramicnetwork/http-client";
import { IDX } from "@ceramicstudio/idx";
+import WalletConnect from "@walletconnect/client";
import config from "@app/config.json";
+import { WalletConnectSigner } from "./WalletConnectSigner";
declare global {
interface Window {
@@ -12,6 +16,15 @@ declare global {
}
}
+/// Gas limits for various transactions.
+const gasLimits = {
+ createOrg: 1_200_000,
+};
+
+export type WalletConnectState =
+ { state: "close" }
+ | { state: "open"; uri: string; onClose: any };
+
export class Config {
network: { name: string; chainId: number };
registrar: { address: string; domain: string };
@@ -21,7 +34,14 @@ export class Config {
orgs: { subgraph: string; contractHash: string };
gasLimits: { createOrg: number };
provider: ethers.providers.JsonRpcProvider;
- signer: ethers.Signer & TypedDataSigner | null;
+ signer: ethers.Signer & TypedDataSigner | WalletConnectSigner | null;
+ walletConnect: {
+ client: WalletConnect;
+ bridge: string;
+ signer: WalletConnectSigner;
+ state: Writable