Fix reactiveness issue with connect

This commit is contained in:
Alexis Sellier
2021-03-11 18:20:37 +01:00
parent 30f86ed464
commit e2db821b99
6 changed files with 46 additions and 13 deletions
+4
View File
@@ -12,3 +12,7 @@ export const STATE = {
};
export const state = writable(STATE.IDLE);
state.subscribe(s => {
console.log("State", s);
});
+2 -1
View File
@@ -1,5 +1,6 @@
import { ethers } from "ethers";
import { formatBalance } from "@app/utils";
import { refreshBalance } from "@app/session";
import { STATE, state } from "./state.js";
const abi = [
@@ -29,7 +30,7 @@ export async function withdrawVested(address, config) {
state.set(STATE.WITHDRAWING);
await tx.wait();
// TODO: Update balance.
refreshBalance(config);
state.set(STATE.WITHDRAWN);
}