Fix walletconnect clientMeta oddities

This commit is contained in:
Alexis Sellier
2021-08-04 12:49:39 +02:00
parent ad823072cd
commit 061a4f75fb
4 changed files with 12 additions and 2 deletions
+1 -1
View File
@@ -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">

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

+1 -1
View File
@@ -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}`);
+10
View File
@@ -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 {