From f6165978f8d83f72d319df46cbdb91f6a0029046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Tue, 11 Oct 2022 17:36:07 +0200 Subject: [PATCH] Remove remaining Gnosis safe code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This should have been removed in cb12d8eeab3b5ff4e9ada5c119d9458f00f86cad. Signed-off-by: Rūdolfs Ošiņš --- src/Address.svelte | 6 ------ src/config.json | 8 -------- src/config.ts | 5 ----- src/utils.test.ts | 26 -------------------------- src/utils.ts | 15 --------------- 5 files changed, 60 deletions(-) diff --git a/src/Address.svelte b/src/Address.svelte index 230188bf4..06a7d1703 100644 --- a/src/Address.svelte +++ b/src/Address.svelte @@ -3,7 +3,6 @@ import { link } from "svelte-routing"; import { ethers } from "ethers"; import { - safeLink, explorerLink, identifyAddress, formatAddress, @@ -100,11 +99,6 @@ {#if !noBadge} org {/if} - {:else if addressType === AddressType.Safe} - {addressLabel} - {#if !noBadge} - safe - {/if} {:else if addressType === AddressType.Contract} {addressLabel} {#if !noBadge} diff --git a/src/config.json b/src/config.json index 0dc9aacd6..86a6a7d2a 100644 --- a/src/config.json +++ b/src/config.json @@ -10,10 +10,6 @@ "users": { "pinned": ["cloudhead.radicle.eth"] }, - "safe": { - "api": "https://safe-transaction.gnosis.io", - "viewer": "https://gnosis-safe.io/app/#/safes" - }, "reverseRegistrar": { "address": "0x084b1c3C81545d370f3634392De611CaaBFf8148" }, @@ -32,10 +28,6 @@ "users": { "pinned": [] }, - "safe": { - "api": "https://safe-transaction.rinkeby.gnosis.io", - "viewer": "https://rinkeby.gnosis-safe.io/app/#/safes" - }, "reverseRegistrar": { "address": "0x6F628b68b30Dc3c17f345c9dbBb1E483c2b7aE5c" }, diff --git a/src/config.ts b/src/config.ts index b591da4c4..288bff06a 100644 --- a/src/config.ts +++ b/src/config.ts @@ -45,10 +45,6 @@ export class Config { connected: false; signer: (ethers.Signer & TypedDataSigner) | null; }; - safe: { - api?: string; - viewer: string | null; - }; abi: { [contract: string]: string[] }; seed: { api: { port: number }; @@ -97,7 +93,6 @@ export class Config { this.radToken = cfg.radToken; this.reverseRegistrar = cfg.reverseRegistrar; this.users = cfg.users; - this.safe = cfg.safe; this.provider = provider; this.signer = null; this.projects = config.projects; diff --git a/src/utils.test.ts b/src/utils.test.ts index 44a6824f9..c09703637 100644 --- a/src/utils.test.ts +++ b/src/utils.test.ts @@ -157,32 +157,6 @@ describe("String Assertions", () => { }); describe("Others", () => { - test.each([ - { - viewer: "https://gnosis-safe.io/app/#/safes", - name: "", - expected: - "https://gnosis-safe.io/app/#/safes/0x5E813e48a81977c6Fdd565ed5097eb600C73C4f0", - }, - { - viewer: null, - name: "", - expected: - "https://etherscan.io/address/0x5E813e48a81977c6Fdd565ed5097eb600C73C4f0", - }, - ])("safeLink $viewer => $expected", ({ name, viewer, expected }) => { - expect( - utils.safeLink("0x5E813e48a81977c6Fdd565ed5097eb600C73C4f0", { - network: { - name, - }, - safe: { - viewer, - }, - } as Config), - ).toEqual(expected); - }); - test.each([ { name: "rinkeby", diff --git a/src/utils.ts b/src/utils.ts index ca9ae7f70..ee1f9aeca 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -21,16 +21,9 @@ import emojis from "@app/emojis"; export enum AddressType { Contract, Org, - Safe, EOA, } -export interface Safe { - address: string; - owners: string[]; - threshold: number; -} - export interface Token { name: string; symbol: string; @@ -305,14 +298,6 @@ export function explorerLink(addr: string, config: Config): string { return `https://etherscan.io/address/${addr}`; } -// Get the Gnosis Safe link of an address, eg. Etherscan. -export function safeLink(addr: string, config: Config): string { - if (config.safe.viewer) { - return `${config.safe.viewer}/${addr}`; - } - return explorerLink(addr, config); -} - // Format a name. export function formatName(input: string, config: Config): string { return parseEnsLabel(input, config);