Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Fix walletconnect clientMeta oddities
Alexis Sellier committed 4 years ago
commit 061a4f75fb3aa110748276f16d8f2862156756da
parent ad823072cdacc369e0f0e799440fd0f8df7e6e53
5 files changed +12 -2
modified index.html
@@ -8,7 +8,7 @@
    <meta name="theme-color" content="#0e171f">
    <link rel="stylesheet" type="text/css" href="/index.css" />
    <link rel="icon" href="/favicon.svg" type="image/svg+xml">
-
    <link rel="icon" href="/favicon.png">
+
    <link rel="icon" href="/favicon.ico">
    <link rel="preload" href="/fonts/Inter-Regular.woff" as="font" type="font/woff">
    <link rel="preload" href="/fonts/Inter-SemiBold.otf" as="font" type="font/otf">
    <script type="text/javascript">
deleted public/favicon.png
added public/logo.png
modified src/base/registrations/resolver.ts
@@ -7,7 +7,7 @@ import { assert } from '@app/error';
export type EnsRecord = { name: string; value: string };

export async function setRecords(name: string, records: EnsRecord[], resolver: EnsResolver, config: Config): Promise<TransactionResponse> {
-
  assert(config.signer);
+
  assert(config.signer, "no signer available");

  const resolverContract = new ethers.Contract(resolver.address, config.abi.resolver, config.signer);
  const node = ethers.utils.namehash(`${name}.${config.registrar.domain}`);
modified src/config.ts
@@ -164,6 +164,16 @@ export class Config {
      }
    });

+
    // Behold, we set this private class variable here because WalletConnect doesn't
+
    // give us any other way to set it :'(
+
    //
+
    // The default is to use the favicon, which doesn't work, given that it is
+
    // designed for browsers and not mobile apps which often show a much bigger
+
    // icon, resulting in a blurry image.
+
    (walletConnect as any)._clientMeta.icons = [
+
      `${window.location.protocol}//${window.location.host}/logo.png`
+
    ];
+

    const walletConnectSigner = new WalletConnectSigner(walletConnect, provider);

    return {