diff --git a/dist/cjs/index.js b/dist/cjs/index.js index ce955d27..aa4d7f82 100644 --- a/dist/cjs/index.js +++ b/dist/cjs/index.js @@ -6,16 +6,13 @@ var depayWeb3Blockchains = require('depay-web3-blockchains'); var depayWeb3Constants = require('depay-web3-constants'); var require$$0 = require('buffer'); var require$$0$1 = require('util'); -var QRCodeModal = require('@walletconnect/qrcode-modal'); -var WalletConnect = require('@walletconnect/client'); +var walletconnect = require('@depay/walletconnect'); var depayWeb3Client = require('depay-web3-client'); function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0); var require$$0__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$0$1); -var QRCodeModal__default = /*#__PURE__*/_interopDefaultLegacy(QRCodeModal); -var WalletConnect__default = /*#__PURE__*/_interopDefaultLegacy(WalletConnect); var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; @@ -18175,9 +18172,9 @@ class WalletConnectWallet { } newWalletConnectInstance() { - let instance = new WalletConnect__default['default']({ + let instance = new walletconnect.WalletConnect({ bridge: "https://bridge.walletconnect.org", - qrcodeModal: QRCodeModal__default['default'] + qrcodeModal: walletconnect.QRCodeModal }); instance.on("connect", (error, payload) => { diff --git a/dist/es/index.js b/dist/es/index.js index b120caba..b4d3e46c 100644 --- a/dist/es/index.js +++ b/dist/es/index.js @@ -2,8 +2,7 @@ import { Blockchain } from 'depay-web3-blockchains'; import { CONSTANTS } from 'depay-web3-constants'; import require$$0 from 'buffer'; import require$$0$1 from 'util'; -import QRCodeModal from '@walletconnect/qrcode-modal'; -import WalletConnect from '@walletconnect/client'; +import { WalletConnect, QRCodeModal } from '@depay/walletconnect'; import { provider } from 'depay-web3-client'; var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; diff --git a/dist/umd/index.js b/dist/umd/index.js index 827c8a94..c144996a 100644 --- a/dist/umd/index.js +++ b/dist/umd/index.js @@ -1,15 +1,13 @@ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('depay-web3-blockchains'), require('depay-web3-constants'), require('buffer'), require('util'), require('@walletconnect/qrcode-modal'), require('@walletconnect/client'), require('depay-web3-client')) : - typeof define === 'function' && define.amd ? define(['exports', 'depay-web3-blockchains', 'depay-web3-constants', 'buffer', 'util', '@walletconnect/qrcode-modal', '@walletconnect/client', 'depay-web3-client'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Web3Wallets = {}, global.Web3Blockchains, global.Web3Constants, global.require$$0, global.require$$0$1, global.WalletConnectQRCodeModal, global.WalletConnect, global.Web3Client)); -}(this, (function (exports, depayWeb3Blockchains, depayWeb3Constants, require$$0, require$$0$1, QRCodeModal, WalletConnect, depayWeb3Client) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('depay-web3-blockchains'), require('depay-web3-constants'), require('buffer'), require('util'), require('@depay/walletconnect'), require('depay-web3-client')) : + typeof define === 'function' && define.amd ? define(['exports', 'depay-web3-blockchains', 'depay-web3-constants', 'buffer', 'util', '@depay/walletconnect', 'depay-web3-client'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Web3Wallets = {}, global.Web3Blockchains, global.Web3Constants, global.require$$0, global.require$$0$1, global.WalletConnect, global.Web3Client)); +}(this, (function (exports, depayWeb3Blockchains, depayWeb3Constants, require$$0, require$$0$1, walletconnect, depayWeb3Client) { 'use strict'; function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0); var require$$0__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$0$1); - var QRCodeModal__default = /*#__PURE__*/_interopDefaultLegacy(QRCodeModal); - var WalletConnect__default = /*#__PURE__*/_interopDefaultLegacy(WalletConnect); var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; @@ -18169,9 +18167,9 @@ } newWalletConnectInstance() { - let instance = new WalletConnect__default['default']({ + let instance = new walletconnect.WalletConnect({ bridge: "https://bridge.walletconnect.org", - qrcodeModal: QRCodeModal__default['default'] + qrcodeModal: walletconnect.QRCodeModal }); instance.on("connect", (error, payload) => { diff --git a/package.json b/package.json index 5d2da095..1ba4cf00 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "depay-web3-wallets", "moduleName": "Web3Wallets", - "version": "5.6.7", + "version": "5.6.8", "description": "One-Stop-Shop JavaScript library to integrate various web3 crypto wallets and multiple blockchains at once with a single interface.", "main": "dist/cjs/index.js", "module": "dist/es/index.js", @@ -35,8 +35,7 @@ "dependencies": { }, "peerDependencies": { - "@walletconnect/client": "^1.6.5", - "@walletconnect/qrcode-modal": "^1.6.5", + "@depay/walletconnect": "^1.0.1", "depay-web3-blockchains": "^2.6.0", "depay-web3-constants": "^3.0.1", "depay-web3-client": "^6.0.0" @@ -51,8 +50,7 @@ "@rollup/plugin-node-resolve": "^11.2.1", "@rollup/plugin-replace": "^2.4.2", "@rollup/plugin-sucrase": "^3.1.0", - "@walletconnect/client": "^1.6.5", - "@walletconnect/qrcode-modal": "^1.6.5", + "@depay/walletconnect": "^1.0.1", "babel-eslint": "^10.1.0", "babel-loader": "^8.2.2", "babel-preset-env": "^1.7.0", diff --git a/rollup.globals.js b/rollup.globals.js index 4bfb6372..7296dda1 100644 --- a/rollup.globals.js +++ b/rollup.globals.js @@ -2,6 +2,5 @@ export default { 'depay-web3-blockchains': 'Web3Blockchains', 'depay-web3-constants': 'Web3Constants', 'depay-web3-client': 'Web3Client', - '@walletconnect/client': 'WalletConnect', - '@walletconnect/qrcode-modal': 'WalletConnectQRCodeModal', + '@depay/walletconnect': 'WalletConnect' } diff --git a/src/wallets/WalletConnect.js b/src/wallets/WalletConnect.js index 93b1e51d..776a7ea5 100644 --- a/src/wallets/WalletConnect.js +++ b/src/wallets/WalletConnect.js @@ -1,5 +1,4 @@ -import QRCodeModal from '@walletconnect/qrcode-modal' -import WalletConnect from '@walletconnect/client' +import { WalletConnect, QRCodeModal } from '@depay/walletconnect' import { Blockchain } from 'depay-web3-blockchains' import { estimate } from './WalletConnect/estimate' import { sendTransaction } from './WalletConnect/transaction' diff --git a/yarn.lock b/yarn.lock index 3b947ee2..8614f118 100644 --- a/yarn.lock +++ b/yarn.lock @@ -875,6 +875,14 @@ "@babel/helper-validator-identifier" "^7.14.9" to-fast-properties "^2.0.0" +"@depay/walletconnect@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@depay/walletconnect/-/walletconnect-1.0.1.tgz#c6b56af3bcff9a82369a6287a8e688082bb2f26c" + integrity sha512-YqYIfJpTy3u8OAl/eEvvEqy/avCkwOA4rPLh27LhaB1N6zrtuLXtK4m5MvsVMQ+BpK2dFOoaD3u8knqixeoOQg== + dependencies: + "@walletconnect/client" "^1.6.5" + "@walletconnect/qrcode-modal" "^1.6.5" + "@eslint/eslintrc@^0.4.3": version "0.4.3" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c"