Skip to content

Commit 4bf1fcb

Browse files
committed
Fix wallet auto-connect for groupless addresses
1 parent d6b2dc1 commit 4bf1fcb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/extension/src/shared/preAuthorizations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { groupOfAddress, KeyType } from "@alephium/web3"
1+
import { groupOfAddress, isGrouplessAddress, KeyType } from "@alephium/web3"
22
import { isArray, pick } from "lodash-es"
33
import browser from "webextension-polyfill"
44
import { RequestOptions } from "../inpage/inpage.model"
@@ -118,7 +118,7 @@ function matchAuthorizedOptions(account: PreAuthorization, options: RequestOptio
118118
return account.host === options.host &&
119119
(options.networkId === undefined || account.account.networkId === options.networkId) &&
120120
(options.address === undefined || account.account.address === options.address) &&
121-
(options.addressGroup === undefined || groupOfAddress(account.account.address) === options.addressGroup)
121+
(options.addressGroup === undefined || groupOfAddress(account.account.address) === options.addressGroup || isGrouplessAddress(account.account.address))
122122
}
123123

124124
export const isPreAuthorized = async (

0 commit comments

Comments
 (0)