Add WalletConnect support

Co-authored-by: Njoku Emmanuel <kalunjoku123@gmail.com>
Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
Alexis Sellier
2021-08-03 16:25:16 +02:00
co-authored by Njoku Emmanuel
parent 767355b782
commit 400a2df0a4
15 changed files with 2272 additions and 105 deletions
+7 -1
View File
@@ -15,9 +15,15 @@
import Loading from '@app/Loading.svelte';
import Modal from '@app/Modal.svelte';
const loadConfig = getConfig().then(cfg => {
const loadConfig = getConfig().then(async cfg => {
if ($state.connection === Connection.Connected) {
state.refreshBalance(cfg);
} else if ($state.connection === Connection.Disconnected) {
// Update the session state if we're already connected to WalletConnect
// from a previous session.
if (cfg.walletConnect.client.connected) {
await state.connectWalletConnect(cfg);
}
}
return cfg;
});