Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Check connection before updating balance
Alexis Sellier committed 4 years ago
commit 8a1c1940fa6582779d7e8bae00323c147a017a68
parent 66c920d578e6cb41d7fe2e737ec4cd0966f10d5d
1 file changed +4 -2
modified src/App.svelte
@@ -1,7 +1,7 @@
<script lang="typescript">
  import { Router, Route } from "svelte-routing";
  import { getConfig } from '@app/config';
-
  import { state, session } from '@app/session';
+
  import { Connection, state, session } from '@app/session';

  import Home from '@app/base/home/Index.svelte';
  import Vesting from '@app/base/vesting/Index.svelte';
@@ -15,7 +15,9 @@
  import Modal from '@app/Modal.svelte';

  const loadConfig = getConfig().then(cfg => {
-
    state.refreshBalance(cfg);
+
    if ($state.connection === Connection.Connected) {
+
      state.refreshBalance(cfg);
+
    }
    return cfg;
  });