mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 18:20:30 +08:00
[eslint] Add rules matching codebase style
This commit is contained in:
+2
-1
@@ -5,8 +5,9 @@ export async function get(
|
||||
params: Record<string, any>,
|
||||
config: Config
|
||||
): Promise<any> {
|
||||
if (! config.seed.api)
|
||||
if (! config.seed.api) {
|
||||
throw new Error("Seed HTTP API unavailable");
|
||||
}
|
||||
|
||||
const query: Record<string, string> = {};
|
||||
for (const [key, val] of Object.entries(params)) {
|
||||
|
||||
+3
-2
@@ -163,8 +163,9 @@ export const loadState = (initial: State): Store => {
|
||||
case Connection.Connected:
|
||||
// In case of locking Metamask the accountsChanged event returns undefined.
|
||||
// To prevent out of sync state, the wallet gets disconnected.
|
||||
if (address === undefined) disconnectWallet();
|
||||
else {
|
||||
if (address === undefined) {
|
||||
disconnectWallet();
|
||||
} else {
|
||||
s.session.address = address;
|
||||
window.localStorage.setItem("session", JSON.stringify({ address, tokenBalance: s.session.tokenBalance, tx: s.session.tx }));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user