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

feat: sync spaces custom domain with walletconnect allowed origins #487

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
refactor: better variable name
  • Loading branch information
wa0x6e committed Jan 13, 2025
commit 519926e54d675f6658e8b5cd7c6a55c8e5f45d31
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ BROVIDER_URL=https://rpc.snapshot.org # optional
STARKNET_RPC_URL= # optional
# Secret for laser
AUTH_SECRET=1dfd84a695705665668c260222ded178d1f1d62d251d7bee8148428dac6d0487 # optional
WALLET_CONNECT_PROJECT_ID= # optional
WALLETCONNECT_PROJECT_ID= # optional
REOWN_SECRET= # optional
4 changes: 2 additions & 2 deletions src/helpers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ async function updateWalletConnectWhitelist(
domain: string,
method: 'POST' | 'DELETE'
): Promise<boolean> {
if (!domain || !process.env.REOWN_SECRET || !process.env.WALLET_CONNECT_PROJECT_ID) return false;
if (!domain || !process.env.REOWN_SECRET || !process.env.WALLETCONNECT_PROJECT_ID) return false;

try {
await fetch(`https://cloud.reown.com/api/set-allowed-domains`, {
Expand All @@ -226,7 +226,7 @@ async function updateWalletConnectWhitelist(
Authorization: process.env.REOWN_SECRET
},
body: JSON.stringify({
projectId: process.env.WALLET_CONNECT_PROJECT_ID,
projectId: process.env.WALLETCONNECT_PROJECT_ID,
origins: [`https://${domain}`]
})
});
Expand Down