Skip to content
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

PKG -- [FCL-WC] Add notifications for pending WC/RPC requests #1970

Merged
merged 14 commits into from
Nov 21, 2024
Prev Previous commit
Next Next commit
prettier
jribbink committed Nov 20, 2024
commit 25f5c3715b7bcda0e80cf1847ec88d782712212a
8 changes: 6 additions & 2 deletions packages/fcl-wc/src/service.ts
Original file line number Diff line number Diff line change
@@ -62,7 +62,11 @@ const makeExec = (
abortSignal?: AbortSignal
user: any
}) => {
const {wcRequestHook, pairingModalOverride, disableNotifications: appDisabledNotifications} = config
const {
wcRequestHook,
pairingModalOverride,
disableNotifications: appDisabledNotifications,
} = config

const client = await clientPromise
invariant(!!client, "WalletConnect is not initialized")
@@ -122,7 +126,7 @@ const makeExec = (
const walletDisabledNotifications =
session?.sessionProperties?.["fclWc.disableNotificationsOnMobile"] ===
jribbink marked this conversation as resolved.
Show resolved Hide resolved
"true"

const notification =
!appDisabledNotifications && !walletDisabledNotifications
? showWcRequestNotification({