mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 18:20:30 +08:00
Fix reactiveness issue with connect
This commit is contained in:
@@ -12,3 +12,7 @@ export const STATE = {
|
||||
};
|
||||
|
||||
export const state = writable(STATE.IDLE);
|
||||
|
||||
state.subscribe(s => {
|
||||
console.log("State", s);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user