Skip to content

Commit

Permalink
fix: modal connect callback return connector if resultType is connector
Browse files Browse the repository at this point in the history
  • Loading branch information
bluecco committed Sep 24, 2024
1 parent 5fae298 commit 97012ea
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,8 @@ export const connect = async ({
callback: async (connector: StarknetkitConnector | null) => {
try {
selectedConnector = connector
const connectorData = (await connector?.connect()) ?? null

if (resultType === "wallet") {
const connectorData = (await connector?.connect()) ?? null
if (connector !== null) {
setStarknetLastConnectedWallet(connector.id)
}
Expand All @@ -155,7 +154,7 @@ export const connect = async ({
resolve({
connector,
wallet: null,
connectorData,
connectorData: null,
})
}
} catch (error) {
Expand Down

0 comments on commit 97012ea

Please sign in to comment.