Installing Wallet Connect
Create a Reown project, add the one environment variable that is not in .env.example, activate the licence, enable the extension, and rebuild — in the order that avoids a 500 nobody can explain.
Installation is four steps: a Reown project, one environment variable, a pass
through the Extension Manager — activate the licence, install the release,
switch it on — and a rebuild. None of it is done by installer.sh. From Core
6.7.5 .env.example carries the variable, empty; on an older install it is not
there at all and you add the line by hand. Either way every step here is manual.
The order matters less than the last step. Skipping the rebuild is the single most common way to end up with a wallet picker that opens perfectly and a sign-in that returns 500.
Before you begin
- A working Bicrypto install — backend, frontend and cron running under PM2
- Redis reachable and answering
PING(the core already requires it) - Shell access to the project root — the rebuild has no admin-panel equivalent
- The purchase code for Wallet Connect (product ID
37548018), from your MashDiv dashboard - An admin account holding
view.extensionandedit.extension - Outbound HTTPS from the backend to
rpc.walletconnect.org
1. Create a Reown project
Reown (formerly WalletConnect) issues the project ID that identifies your install to the wallet network. The free tier is sufficient.
-
Sign up at cloud.reown.com.
-
Create a new project. Choose type App, and set the homepage URL to the domain your platform is served from — the same origin as
NEXT_PUBLIC_SITE_URL. -
Copy the Project ID. It is a 32-character hex string shown on the project dashboard.
-
Restrict it to your domains. In the project's settings, add your production origin to the allowed-domains list. The project ID is compiled into the public JavaScript bundle and is visible to anyone who loads your site, so domain restriction is the only thing that stops it being used elsewhere against your quota.
2. Add the environment variable
Set it in .env in the project root:
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID="your_32_character_project_id"Nothing at start-up complains about an empty value, on any release. The two halves of the platform then fail separately.
The frontend has no fallback. The id is compiled into the browser bundle, and a build without one cannot open the wallet picker at all. From Core 6.7.5 every wallet screen — Sign in with wallet, the profile's Wallet tab, the NFT wallet actions and the Swap terminal — renders a "Wallet connection is not set up yet" card in its place, an admin viewing it is shown the variable to set, and the frontend prints a warning at build and on every start. On Core 6.6.2 – 6.7.4 those same screens were the platform's whole-page 500 "Something went wrong!" card, with the cause visible only in the browser console; up to Core 6.6.1 a hard-coded fallback id was compiled in instead, so the picker worked and only signing failed — see Troubleshooting.
The backend has no fallback either. With the id compiled into the frontend
but absent from the backend's environment, the picker opens and a wallet
connects, and POST /api/auth/login/wallet returns 500 "Wallet connect
project ID is not defined" the moment the user signs. That is a working
Connect wallet and a broken Sign in with wallet, which reads like a
signature problem rather than a missing variable.
A working wallet picker therefore proves the frontend build has an id, not that the backend does. Check the variable directly:
grep NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID .envThe metadata your users will see
The wallet's approval sheet shows a name, a description and an icon, and all three come from variables you already have. Set them properly before you invite anyone to sign — a request to sign a message from "Bicrypto" on a site branded something else is exactly what users are taught to reject.
| Variable | Where it shows |
|---|---|
NEXT_PUBLIC_SITE_NAME |
The application name in the wallet's approval sheet. Defaults to Bicrypto |
NEXT_PUBLIC_SITE_DESCRIPTION |
The description beneath it |
NEXT_PUBLIC_SITE_URL |
The fallback origin when the value cannot be read from the browser |
The icon is served from /img/logo/logo.png on your own origin. If that file is
missing, the wallet shows a generic placeholder.
3. Activate the licence, install the release and enable the extension
- The Wallet Connect card — click it to open the product page
- Its switch stays disabled until the licence is activated
-
Open the Extension Manager. Go to Admin → System → Extension Manager — the page heading reads Add-ons & Integrations. On the Extensions tab (or by searching for Wallet) find the Wallet Connect card — product ID
37548018— and click it. Until its licence is activated the card's chip reads Activate and its switch is disabled, with a tooltip that says Activate license first. -
Activate the licence. On the product page press Activate License. Paste the purchase code from your MashDiv dashboard, optionally an email address for update notifications, and press Activate License. The screen confirms License Activated! and sends you back to the product page a couple of seconds later. If the server has no outbound access, the License File tab on the same screen takes the licence certificate downloaded from your MashDiv dashboard instead.
- Paste the purchase code here
- Activate License — then wait for the redirect back to the product page
- The offline route, for a server with no outbound HTTPS
-
Install the release. Back on the product page, now licensed, the Overview tab has a release panel. If it offers Install v…, press it; if it says Up to date on a product you have only just licensed, press Check for Updates once, then install whatever it offers. The Releases tab holds the notes for the version you are being offered — read them first.
Install downloads the release, verifies it and extracts it over the project root. It runs no migrations, builds nothing and restarts nothing, so finish it from a shell on the server:
pnpm updatorIf the panel still says Up to date after the check there is nothing to download — the release already on the server is current — and you go straight to the switch.
- Check for Updates, then Install v… when it is offered
- Releases — the notes for the version you are about to install
- The Enabled switch — the final step, not yet
-
Switch it on. Turn the Enabled switch on — in the product page heading, or on the card in the Extension Manager, which is usable now that the licence is verified. It takes effect without a restart, and it is what makes the Sign in with wallet option appear below the password form on the login page and the Wallet tab appear in the user profile. Turning the extension off later is the same switch; it leaves the licence in place, so switching back on needs no reactivation.
Most extensions are enforced by route prefix — /api/p2p is refused unless P2P
is licensed. Wallet Connect has no route prefix of its own. Its endpoints live
under /api/auth and /api/user/profile, both of which are deliberately exempt
from licence enforcement so that login keeps working while a core licence is
being re-activated.
Enforcement therefore happens inside the handlers instead. Each one checks that
the extension is enabled and that lic/37548018.lic exists on disk, and
returns 403 if either is untrue. Deleting the .lic file disables wallet
sign-in immediately, without touching the toggle.
4. Rebuild and restart
Both processes need to pick up the variable, and they pick it up differently.
If the install in step 3 ended with pnpm updator and the variable was
already in .env when it ran, this is done — go straight to the verification.
If the release panel said Up to date and nothing was installed, or you added
the variable afterwards, run it now:
pnpm updatorThat stops the platform, installs dependencies, applies the schema and seed data, rebuilds the frontend and starts everything again. If you only changed the environment variable and want the shorter path:
pnpm build:frontend
pnpm restartThe variable name begins with NEXT_PUBLIC_, so Next.js inlines its value
into the JavaScript bundle at build time. Editing .env and restarting the
frontend changes nothing — the old value is already compiled in. You must
rebuild.
The backend reads the same variable at module load, once, when the route file
is first imported. Editing .env without restarting the backend changes nothing
there either.
Together these produce the confusing middle state: a rebuild without a restart gives you a frontend on the new project ID and a backend still verifying against the old one.
5. Verify
-
The button exists. Open the login page signed out. Below the password form there should be a Sign in with wallet option. If it is absent, the extension is not in the
/api/settingsextensions list — go back to step 3. -
The picker opens. Click it, then Connect wallet. The Reown modal should list MetaMask, WalletConnect, Coinbase and the rest, and the header should show your site name rather than "Bicrypto".
-
A nonce is issued. From the server, unauthenticated:
curl -i https://yourdomain.com/api/auth/login/nonceA 32-character hex string means the extension is enabled and licensed. A 403 means it is not. Note that this consumes one of five requests in the fifteen-minute rate-limit window.
-
Link a wallet. Sign in with an existing email account, go to
/user/profile?tab=wallet, and connect. Your wallet prompts for a signature; on success the tab shows the address as active. -
Sign in with it. Sign out, choose Sign in with wallet, connect the same wallet and sign. You should land back on the dashboard signed in as the same user.
If step 5 fails, do not retry immediately — you have four requests left in the window and each attempt costs two. Read Troubleshooting first.
What you have not configured
There is no admin screen for this addon and no settings of its own. In particular there is no way, from any screen, to:
- change which chains are accepted — the allow-list is in code, listed in Wallets, chains and endpoints;
- disable wallet sign-in while leaving wallet linking on, or the reverse — the extension toggle governs both;
- require a wallet at registration, or auto-create accounts from a wallet — see Linking a wallet for why that path does not exist;
- see who has linked a wallet. The admin user list exposes a wallet address column, but it reads a field this addon never writes.
Next
What the three requests do, what the backend verifies, and what it does not.
The Wallet tab, the row it writes, and the field it does not.