Skip to content

Commit 6156185

Browse files
authored
awaittttt (#41)
1 parent c2f3de9 commit 6156185

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/account-sdk/src/interface/builder/core/BaseAccountProvider.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ export class BaseAccountProvider extends ProviderEventEmitter implements Provide
131131
return result as T;
132132
} catch (error) {
133133
const { code } = error as { code?: number };
134-
if (code === standardErrorCodes.provider.unauthorized) this.disconnect();
134+
if (code === standardErrorCodes.provider.unauthorized) {
135+
await this.disconnect();
136+
}
135137
return Promise.reject(serializeError(error));
136138
}
137139
}

packages/account-sdk/src/interface/builder/core/wagmiConnector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export function baseAccountConnector(parameters: BaseAccountSDKParameters) {
103103
disconnect = undefined;
104104
}
105105

106-
provider.disconnect();
106+
await provider.disconnect();
107107
},
108108
async getAccounts() {
109109
const provider = await this.getProvider();

0 commit comments

Comments
 (0)