Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Remove unused error notification code
Rūdolfs Ošiņš committed 3 years ago
commit 78c76981e8899115088b6cd863f13c06375cee51
parent fcbea6dac39634a8b9bdea162da90710f9bd1323
2 files changed +0 -35
modified src/Header.svelte
@@ -20,7 +20,6 @@
  import { Profile, ProfileType } from "@app/profile";
  import { closeFocused } from "@app/Floating.svelte";
  import { disconnectWallet } from "@app/session";
-
  import { error, Failure } from "@app/error";
  import { formatAddress, formatBalance } from "@app/utils";

  export let session: Session | null;
@@ -66,20 +65,6 @@
    align-items: center;
    margin-right: 0.5rem;
  }
-
  .error {
-
    text-align: center;
-
    color: var(--color-negative);
-
    border: 1px solid var(--color-negative);
-
    padding: 0.5rem;
-
  }
-
  .error a {
-
    color: var(--color-negative);
-
    text-decoration: none;
-
    border-bottom: dotted var(--color-negative) 1px;
-
  }
-
  .error a:hover {
-
    text-decoration: none;
-
  }
  .search {
    width: 16rem;
  }
@@ -148,22 +133,6 @@
  }
</style>

-
{#if $error}
-
  {#if $error.type === Failure.TransactionFailed}
-
    <div class="error">
-
      {#if $error.message}
-
        <span class="txt-bold">Error:</span>
-
        {$error.message}
-
      {:else if $error.txHash}
-
        <span class="txt-bold">Error:</span>
-
        Transaction
-
        <a href="https://etherscan.io/tx/{$error.txHash}">{$error.txHash}</a>
-
        failed.
-
      {/if}
-
    </div>
-
  {/if}
-
{/if}
-

<header>
  <div class="left">
    <a use:link href="/" class="logo"><Logo /></a>
modified src/error.ts
@@ -1,5 +1,3 @@
-
import { writable } from "svelte/store";
-

export interface Err {
  type: Failure;
  txHash?: string;
@@ -12,8 +10,6 @@ export enum Failure {
  InsufficientBalance = 3,
}

-
export const error = writable<Err | null>(null);
-

export class Unreachable extends Error {
  constructor(value?: never) {
    if (value) {