Skip to content

Conversation

@yungyoseo
Copy link

Description

Fixed browser compatibility issue with BIP122Verifier by using dynamic import for bip322-js library. This resolves the "Cannot read properties of undefined (reading 'slice')" error that occurred when the verifier was exported in browser environments.

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Associated Issues

closes #5361

Showcase (Optional)

Before

Browser console error when BIP122Verifier was exported:

Uncaught TypeError: Cannot read properties of undefined (reading 'slice') at node_modules/readable-stream/lib/_stream_writable.js

After

  • No errors in browser console
  • Page renders correctly
  • BIP122Verifier works in browser environments without requiring explicit Node.js polyfills

Checklist

  • Code in this PR is covered by automated tests (Unit tests, E2E tests)
  • My changes generate no new warnings
  • I have reviewed my own code
  • I have filled out all required sections
  • I have tested my changes on the preview link
  • Approver of this PR confirms that the changes are tested on the preview link

@changeset-bot
Copy link

changeset-bot bot commented Nov 24, 2025

🦋 Changeset detected

Latest commit: d202441

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 25 packages
Name Type
@reown/appkit-siwx Patch
@reown/appkit Patch
@reown/appkit-adapter-bitcoin Patch
@reown/appkit-adapter-ethers Patch
@reown/appkit-adapter-ethers5 Patch
@reown/appkit-adapter-solana Patch
@reown/appkit-adapter-ton Patch
@reown/appkit-adapter-wagmi Patch
@reown/appkit-common Patch
@reown/appkit-universal-connector Patch
@reown/appkit-ui Patch
@reown/appkit-controllers Patch
@reown/appkit-core Patch
@reown/appkit-utils Patch
@reown/appkit-scaffold-ui Patch
@reown/appkit-polyfills Patch
@reown/appkit-wallet Patch
@reown/appkit-siwe Patch
@reown/appkit-wallet-button Patch
@reown/appkit-cdn Patch
@reown/appkit-experimental Patch
@reown/appkit-testing Patch
@reown/appkit-cli Patch
@reown/appkit-pay Patch
@reown/appkit-codemod Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Nov 24, 2025

@yungyoseo is attempting to deploy a commit to the Reown Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 24, 2025

All contributors have signed the CTA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@wearedood
Copy link

Excellent fix for the BIP122Verifier browser compatibility issue! I've encountered this exact 'Cannot read properties of undefined (reading slice)' error when integrating AppKit with Bitcoin address verification in browser environments. The dynamic import approach for the bip322-js library is the right solution - it prevents the Node.js-specific modules from breaking browser builds. I've been using AppKit extensively in my Base dApp development and browser compatibility is crucial for seamless user experience. The failing Vercel deployments seem to be authorization-related rather than code issues, which suggests the fix itself is solid. This change will make Bitcoin address verification much more reliable across different browser environments. Great work on maintaining the AppKit ecosystem's browser-first approach!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Browser rendering fails when using @reown_appkit-siwx in Vite + React

2 participants