Skip to content

Commit

Permalink
fix: remove inline experssion
Browse files Browse the repository at this point in the history
  • Loading branch information
zoruka committed Nov 15, 2024
1 parent b6c3ad5 commit 03139c7
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions packages/appkit/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -712,13 +712,17 @@ export class AppKit {
(await this.universalProvider?.client?.core?.crypto?.getClientId()) || null
)

const isAuthenticated =
this.universalProvider &&
(await SIWXUtil.universalProviderAuthenticate({
let isAuthenticated = false

if (this.universalProvider) {
const chains = this.caipNetworks?.map(network => network.caipNetworkId) || []

isAuthenticated = await SIWXUtil.universalProviderAuthenticate({
universalProvider: this.universalProvider,
chains: this.caipNetworks?.map(network => network.caipNetworkId) || [],
chains,
methods: OPTIONAL_METHODS
}))
})
}

if (isAuthenticated) {
this.close()
Expand Down

0 comments on commit 03139c7

Please sign in to comment.