Skip to content

Commit

Permalink
fix: provider in account
Browse files Browse the repository at this point in the history
  • Loading branch information
bluecco committed Apr 9, 2024
1 parent 580d717 commit 613db1e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/connectors/injected/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ export class InjectedConnector extends Connector {
let accounts
try {
accounts = await this._wallet.enable({ starknetVersion: "v5" })

const { provider } = this._options
if (provider) {
Object.assign(this._wallet.account, {
provider,
})
}
} catch {
// NOTE: Argent v3.0.0 swallows the `.enable` call on reject, so this won't get hit.
throw new UserRejectedRequestError()
Expand Down
2 changes: 2 additions & 0 deletions src/connectors/webwallet/helpers/openWebwallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export const openWebwallet = async (
return await getWebWalletStarknetObject(
origin,
windowProxyClient,
provider,
undefined,
)
}
Expand Down Expand Up @@ -91,6 +92,7 @@ export const openWebwallet = async (
return await getWebWalletStarknetObject(
origin,
windowProxyClient,
provider,
undefined,
)
}
Expand Down

0 comments on commit 613db1e

Please sign in to comment.