@bsv/sdk 1.8.11 → 1.8.12

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bsv/sdk",
3
- "version": "1.8.11",
3
+ "version": "1.8.12",
4
4
  "type": "module",
5
5
  "description": "BSV Blockchain Software Development Kit",
6
6
  "main": "dist/cjs/mod.js",
@@ -26,9 +26,9 @@ export class WalletError extends Error {
26
26
  */
27
27
  static unknownToJson (error: any): string {
28
28
  let e: any | undefined
29
- if (typeof error.constructor.name === 'string' && String(error.constructor.name).startsWith('WERR_')) {
29
+ if (error.isError === true && String(error.name).startsWith('WERR_')) {
30
30
  e = {
31
- name: error.constructor.name,
31
+ name: error.name,
32
32
  message: error.message,
33
33
  isError: true
34
34
  }