@sats-connect/core 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +7 -0
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -553,6 +553,13 @@ var addListener = (event, cb, providerId) => {
553
553
  if (!provider) {
554
554
  throw new Error("no wallet provider was found");
555
555
  }
556
+ if (!provider.addListener) {
557
+ console.error(
558
+ `The wallet provider you are using does not support the addListener method. Please update your wallet provider.`
559
+ );
560
+ return () => {
561
+ };
562
+ }
556
563
  return provider.addListener(event, cb);
557
564
  };
558
565
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sats-connect/core",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "main": "dist/index.mjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.mts",