Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

Commit

Permalink
fix: show icon and website when connecting via walletConnect
Browse files Browse the repository at this point in the history
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
  • Loading branch information
rudolfs committed Aug 9, 2021
1 parent 06bd982 commit c377197
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion ui/src/ethereum/walletConnect.ts
Expand Up @@ -163,7 +163,7 @@ function createConnector(): Connector {
// with `onClose` and aborting the connection.
let modalClosedByWalletConnect = false;

return new Connector({
const connector = new Connector({
bridge: "https://radicle.bridge.walletconnect.org",
qrcodeModal: {
open: (uri: string, onClose, _opts?: unknown) => {
Expand All @@ -185,6 +185,20 @@ function createConnector(): Connector {
},
},
});

const clientMeta = {
name: "Radicle Upstream",
description: "Desktop client for Radicle",
url: "http://radicle.xyz",
icons: ["https://radicle.xyz/img/radicle-walletconnect-icon.png"],
};

// @ts-expect-error: Electron owerwrites window APIs, which means that when
// setting `clientMeta` via the Connector params they get overwritten and
// return `undefined`.
connector._clientMeta = clientMeta;

return connector;
}

// Try to run `f` with `mutex.runExclusive()`. Throws an error if
Expand Down

0 comments on commit c377197

Please sign in to comment.