diff --git a/src/providers/walletconnectNotify.ts b/src/providers/walletconnectNotify.ts index 7d37471..c5d2e5a 100644 --- a/src/providers/walletconnectNotify.ts +++ b/src/providers/walletconnectNotify.ts @@ -89,6 +89,9 @@ function formatMessage(event: Event, proposal) { } export async function send(event: Event, proposal, addresses: string[]) { + if (!isConfigured()) { + console.log('[WalletConnect] Sending skipped: client not setup'); + } if (event.event !== 'proposal/start') return; const notificationMessage = formatMessage(event, proposal); @@ -96,3 +99,12 @@ export async function send(event: Event, proposal, addresses: string[]) { await queueNotificationsToSend(notificationMessage, accounts); } + +function isConfigured() { + return ( + WALLETCONNECT_NOTIFY_SERVER_URL && + WALLETCONNECT_PROJECT_SECRET && + WALLETCONNECT_PROJECT_ID && + WALLETCONNECT_NOTIFICATION_TYPE + ); +}