mirror of
https://github.com/zhigang1992/connect.git
synced 2026-04-28 09:25:40 +08:00
fix: manually fix new eslint bugs
This commit is contained in:
committed by
Thomas Osmonson
parent
c84c8933ce
commit
7650b7a753
@@ -28,8 +28,7 @@ export const useWallet = () => {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
fetchSecretKey();
|
||||
void fetchSecretKey();
|
||||
}, [onboardingSecretKey]);
|
||||
|
||||
return { identities, firstIdentity, wallet, secretKey, isRestoringWallet, isSignedIn };
|
||||
|
||||
@@ -34,7 +34,6 @@ export const authenticate = async ({
|
||||
}: AuthOptions) => {
|
||||
if (!userSession) {
|
||||
const appConfig = new AppConfig(['store_write'], document.location.href);
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
userSession = new UserSession({ appConfig });
|
||||
}
|
||||
if (userSession.isUserSignedIn()) {
|
||||
@@ -127,8 +126,7 @@ const setupListener = ({ popup, authRequest, finished, authURL, userSession }: L
|
||||
};
|
||||
|
||||
const receiveMessageCallback = (event: MessageEvent) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
receiveMessage(event);
|
||||
void receiveMessage(event);
|
||||
};
|
||||
|
||||
window.addEventListener('message', receiveMessageCallback, false);
|
||||
|
||||
@@ -42,8 +42,7 @@ export const useConnect = () => {
|
||||
sendToSignIn: true,
|
||||
};
|
||||
doStartAuth();
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
authenticate(options);
|
||||
void authenticate(options);
|
||||
return;
|
||||
}
|
||||
authOptions && doUpdateAuthOptions(authOptions);
|
||||
@@ -55,8 +54,7 @@ export const useConnect = () => {
|
||||
};
|
||||
const doAuth = (options: Partial<AuthOptions> = {}) => {
|
||||
doStartAuth();
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
authenticate({
|
||||
void authenticate({
|
||||
...authOptions,
|
||||
...options,
|
||||
finished: payload => {
|
||||
|
||||
@@ -158,7 +158,7 @@ export const registerSubdomain = async ({
|
||||
zoneFile,
|
||||
identity,
|
||||
});
|
||||
// eslint-disable-next-line require-atomic-updates
|
||||
|
||||
identity.defaultUsername = fullUsername;
|
||||
identity.usernames.push(fullUsername);
|
||||
return identity;
|
||||
|
||||
Reference in New Issue
Block a user