Skip to content

Fix the Safe connector options and add Blockscout to the list of allowed domains #2038

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@web3-onboard/frame": "^2.0.2",
"@web3-onboard/frontier": "^2.0.3",
"@web3-onboard/gas": "^2.1.7",
"@web3-onboard/gnosis": "^2.1.10",
"@web3-onboard/gnosis": "^2.2.1-alpha.1",
"@web3-onboard/infinity-wallet": "^2.0.3",
"@web3-onboard/injected-wallets": "^2.10.9",
"@web3-onboard/keepkey": "^2.3.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/gnosis/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/gnosis",
"version": "2.2.0",
"version": "2.2.1-alpha.1",
"description": "Safe module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
"keywords": [
"Ethereum",
Expand Down
7 changes: 4 additions & 3 deletions packages/gnosis/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { WalletInit } from '@web3-onboard/common'
import type { WalletInit } from '@web3-onboard/common'

type GnosisOptions = {
whitelistedDomains: RegExp[]
Expand All @@ -8,7 +8,8 @@ function gnosis(options?: GnosisOptions): WalletInit {
const {
whitelistedDomains = [
/^https:\/\/app\.safe\.global$/,
/^https:\/\/safe\.global$/
/^https:\/\/safe\.global$/,
/^https:\/\/.*\.blockscout\.com$/
]
} = options || {}

Expand Down Expand Up @@ -37,7 +38,7 @@ function gnosis(options?: GnosisOptions): WalletInit {
SafeAppsSDK.default || SafeAppsSDK

const opts = {
whitelistedDomains
allowedDomains: whitelistedDomains
}

const appsSdk = new SafeAppProviderConstructor(opts)
Expand Down