Remove remaining Gnosis safe code

This should have been removed in
cb12d8eeab.

Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
Rūdolfs Ošiņš
2022-10-11 17:36:07 +02:00
parent 0b27e4bbfd
commit f6165978f8
5 changed files with 0 additions and 60 deletions
-6
View File
@@ -3,7 +3,6 @@
import { link } from "svelte-routing";
import { ethers } from "ethers";
import {
safeLink,
explorerLink,
identifyAddress,
formatAddress,
@@ -100,11 +99,6 @@
{#if !noBadge}
<Badge variant="foreground">org</Badge>
{/if}
{:else if addressType === AddressType.Safe}
<a href={safeLink(address, config)} target="_blank">{addressLabel}</a>
{#if !noBadge}
<Badge variant="caution">safe</Badge>
{/if}
{:else if addressType === AddressType.Contract}
<a href={explorerLink(address, config)} target="_blank">{addressLabel}</a>
{#if !noBadge}
-8
View File
@@ -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"
},
-5
View File
@@ -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;
-26
View File
@@ -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",
-15
View File
@@ -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);