diff --git a/lerna.json b/lerna.json index fbd1321c7..e9aaad448 100644 --- a/lerna.json +++ b/lerna.json @@ -1,4 +1,4 @@ { - "version": "4.2.2", + "version": "4.3.0", "$schema": "node_modules/lerna/schemas/lerna-schema.json" } diff --git a/package-lock.json b/package-lock.json index bfe16ef79..eee6f2df5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,9 +22,9 @@ "@airgap/beacon-ui": "file:packages/beacon-ui", "@airgap/beacon-utils": "file:packages/beacon-utils", "@airgap/beacon-wallet": "file:packages/beacon-wallet", - "@walletconnect/sign-client": "2.11.2", - "@walletconnect/types": "2.11.2", - "@walletconnect/utils": "2.11.2", + "@walletconnect/sign-client": "2.14.0", + "@walletconnect/types": "2.14.0", + "@walletconnect/utils": "2.14.0", "@web3modal/standalone": "2.0.0", "stream-browserify": "^3.0.0" }, @@ -6156,27 +6156,27 @@ } }, "node_modules/@walletconnect/core": { - "version": "2.11.2", - "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.11.2.tgz", - "integrity": "sha512-bB4SiXX8hX3/hyBfVPC5gwZCXCl+OPj+/EDVM71iAO3TDsh78KPbrVAbDnnsbHzZVHlsMohtXX3j5XVsheN3+g==", + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.14.0.tgz", + "integrity": "sha512-E/dgBM9q3judXnTfZQ5ILvDpeSdDpabBLsXtYXa3Nyc26cfNplfLJ2nXm9FgtTdhM1nZ7yx4+zDPiXawBRZl2g==", "dependencies": { - "@walletconnect/heartbeat": "1.2.1", - "@walletconnect/jsonrpc-provider": "1.0.13", - "@walletconnect/jsonrpc-types": "1.0.3", + "@walletconnect/heartbeat": "1.2.2", + "@walletconnect/jsonrpc-provider": "1.0.14", + "@walletconnect/jsonrpc-types": "1.0.4", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/jsonrpc-ws-connection": "1.0.14", - "@walletconnect/keyvaluestorage": "^1.1.1", - "@walletconnect/logger": "^2.0.1", - "@walletconnect/relay-api": "^1.0.9", - "@walletconnect/relay-auth": "^1.0.4", - "@walletconnect/safe-json": "^1.0.2", - "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.11.2", - "@walletconnect/utils": "2.11.2", - "events": "^3.3.0", + "@walletconnect/keyvaluestorage": "1.1.1", + "@walletconnect/logger": "2.1.2", + "@walletconnect/relay-api": "1.0.10", + "@walletconnect/relay-auth": "1.0.4", + "@walletconnect/safe-json": "1.0.2", + "@walletconnect/time": "1.0.2", + "@walletconnect/types": "2.14.0", + "@walletconnect/utils": "2.14.0", + "events": "3.3.0", "isomorphic-unfetch": "3.1.0", "lodash.isequal": "4.5.0", - "uint8arrays": "^3.1.0" + "uint8arrays": "3.1.0" } }, "node_modules/@walletconnect/environment": { @@ -6197,32 +6197,32 @@ } }, "node_modules/@walletconnect/heartbeat": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@walletconnect/heartbeat/-/heartbeat-1.2.1.tgz", - "integrity": "sha512-yVzws616xsDLJxuG/28FqtZ5rzrTA4gUjdEMTbWB5Y8V1XHRmqq4efAxCw5ie7WjbXFSUyBHaWlMR+2/CpQC5Q==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@walletconnect/heartbeat/-/heartbeat-1.2.2.tgz", + "integrity": "sha512-uASiRmC5MwhuRuf05vq4AT48Pq8RMi876zV8rr8cV969uTOzWdB/k+Lj5yI2PBtB1bGQisGen7MM1GcZlQTBXw==", "dependencies": { "@walletconnect/events": "^1.0.1", "@walletconnect/time": "^1.0.2", - "tslib": "1.14.1" + "events": "^3.3.0" } }, "node_modules/@walletconnect/jsonrpc-provider": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.13.tgz", - "integrity": "sha512-K73EpThqHnSR26gOyNEL+acEex3P7VWZe6KE12ZwKzAt2H4e5gldZHbjsu2QR9cLeJ8AXuO7kEMOIcRv1QEc7g==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.14.tgz", + "integrity": "sha512-rtsNY1XqHvWj0EtITNeuf8PHMvlCLiS3EjQL+WOkxEOA4KPxsohFnBDeyPYiNm4ZvkQdLnece36opYidmtbmow==", "dependencies": { "@walletconnect/jsonrpc-utils": "^1.0.8", "@walletconnect/safe-json": "^1.0.2", - "tslib": "1.14.1" + "events": "^3.3.0" } }, "node_modules/@walletconnect/jsonrpc-types": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.3.tgz", - "integrity": "sha512-iIQ8hboBl3o5ufmJ8cuduGad0CQm3ZlsHtujv9Eu16xq89q+BG7Nh5VLxxUgmtpnrePgFkTwXirCTkwJH1v+Yw==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.4.tgz", + "integrity": "sha512-P6679fG/M+wuWg9TY8mh6xFSdYnFyFjwFelxyISxMDrlbXokorEVXYOxiqEbrU3x1BmBoCAJJ+vtEaEoMlpCBQ==", "dependencies": { - "keyvaluestorage-interface": "^1.0.0", - "tslib": "1.14.1" + "events": "^3.3.0", + "keyvaluestorage-interface": "^1.0.0" } }, "node_modules/@walletconnect/jsonrpc-utils": { @@ -6303,19 +6303,19 @@ } }, "node_modules/@walletconnect/sign-client": { - "version": "2.11.2", - "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.11.2.tgz", - "integrity": "sha512-MfBcuSz2GmMH+P7MrCP46mVE5qhP0ZyWA0FyIH6/WuxQ6G+MgKsGfaITqakpRPsykWOJq8tXMs3XvUPDU413OQ==", + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.14.0.tgz", + "integrity": "sha512-UrB3S3eLjPYfBLCN3WJ5u7+WcZ8kFMe/QIDqLf76Jk6TaLwkSUy563LvnSw4KW/kA+/cY1KBSdUDfX1tzYJJXg==", "dependencies": { - "@walletconnect/core": "2.11.2", - "@walletconnect/events": "^1.0.1", - "@walletconnect/heartbeat": "1.2.1", + "@walletconnect/core": "2.14.0", + "@walletconnect/events": "1.0.1", + "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/logger": "^2.0.1", - "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.11.2", - "@walletconnect/utils": "2.11.2", - "events": "^3.3.0" + "@walletconnect/logger": "2.1.2", + "@walletconnect/time": "1.0.2", + "@walletconnect/types": "2.14.0", + "@walletconnect/utils": "2.14.0", + "events": "3.3.0" } }, "node_modules/@walletconnect/time": { @@ -6327,37 +6327,37 @@ } }, "node_modules/@walletconnect/types": { - "version": "2.11.2", - "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.11.2.tgz", - "integrity": "sha512-p632MFB+lJbip2cvtXPBQslpUdiw1sDtQ5y855bOlAGquay+6fZ4h1DcDePeKQDQM3P77ax2a9aNPZxV6y/h1Q==", + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.14.0.tgz", + "integrity": "sha512-vevMi4jZLJ55vLuFOicQFmBBbLyb+S0sZS4IsaBdZkQflfGIq34HkN13c/KPl4Ye0aoR4/cUcUSitmGIzEQM5g==", "dependencies": { - "@walletconnect/events": "^1.0.1", - "@walletconnect/heartbeat": "1.2.1", - "@walletconnect/jsonrpc-types": "1.0.3", - "@walletconnect/keyvaluestorage": "^1.1.1", - "@walletconnect/logger": "^2.0.1", - "events": "^3.3.0" + "@walletconnect/events": "1.0.1", + "@walletconnect/heartbeat": "1.2.2", + "@walletconnect/jsonrpc-types": "1.0.4", + "@walletconnect/keyvaluestorage": "1.1.1", + "@walletconnect/logger": "2.1.2", + "events": "3.3.0" } }, "node_modules/@walletconnect/utils": { - "version": "2.11.2", - "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.11.2.tgz", - "integrity": "sha512-LyfdmrnZY6dWqlF4eDrx5jpUwsB2bEPjoqR5Z6rXPiHJKUOdJt7az+mNOn5KTSOlRpd1DmozrBrWr+G9fFLYVw==", + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.14.0.tgz", + "integrity": "sha512-vRVomYQEtEAyCK2c5bzzEvtgxaGGITF8mWuIL+WYSAMyEJLY97mirP2urDucNwcUczwxUgI+no9RiNFbUHreQQ==", "dependencies": { "@stablelib/chacha20poly1305": "1.0.1", "@stablelib/hkdf": "1.0.1", - "@stablelib/random": "^1.0.2", + "@stablelib/random": "1.0.2", "@stablelib/sha256": "1.0.1", - "@stablelib/x25519": "^1.0.3", - "@walletconnect/relay-api": "^1.0.9", - "@walletconnect/safe-json": "^1.0.2", - "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.11.2", - "@walletconnect/window-getters": "^1.0.1", - "@walletconnect/window-metadata": "^1.0.1", + "@stablelib/x25519": "1.0.3", + "@walletconnect/relay-api": "1.0.10", + "@walletconnect/safe-json": "1.0.2", + "@walletconnect/time": "1.0.2", + "@walletconnect/types": "2.14.0", + "@walletconnect/window-getters": "1.0.1", + "@walletconnect/window-metadata": "1.0.1", "detect-browser": "5.3.0", "query-string": "7.1.3", - "uint8arrays": "^3.1.0" + "uint8arrays": "3.1.0" } }, "node_modules/@walletconnect/window-getters": { @@ -8835,9 +8835,9 @@ "dev": true }, "node_modules/cookie-es": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/cookie-es/-/cookie-es-1.1.0.tgz", - "integrity": "sha512-L2rLOcK0wzWSfSDA33YR+PUHDG10a8px7rUHKWbGLP4YfbsMed2KFUw5fczvDPbT98DDe3LEzviswl810apTEw==" + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cookie-es/-/cookie-es-1.2.2.tgz", + "integrity": "sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg==" }, "node_modules/core-js": { "version": "2.6.12", @@ -14850,12 +14850,9 @@ } }, "node_modules/listhen/node_modules/node-addon-api": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.0.tgz", - "integrity": "sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g==", - "engines": { - "node": "^16 || ^18 || >= 20" - } + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==" }, "node_modules/lit": { "version": "2.6.1", @@ -23622,9 +23619,9 @@ } }, "node_modules/ufo": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.3.tgz", - "integrity": "sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==" + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.4.tgz", + "integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==" }, "node_modules/uglify-js": { "version": "3.17.4", @@ -23639,9 +23636,9 @@ } }, "node_modules/uint8arrays": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", - "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.0.tgz", + "integrity": "sha512-ei5rfKtoRO8OyOIor2Rz5fhzjThwIHJZ3uyDPnDHTXbP0aMQ1RN/6AI5B5d9dBxJOU+BvOAk7ZQ1xphsX8Lrog==", "dependencies": { "multiformats": "^9.4.2" } @@ -23726,15 +23723,15 @@ } }, "node_modules/unenv": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/unenv/-/unenv-1.9.0.tgz", - "integrity": "sha512-QKnFNznRxmbOF1hDgzpqrlIf6NC5sbZ2OJ+5Wl3OX8uM+LUJXbj4TXvLJCtwbPTmbMHCLIz6JLKNinNsMShK9g==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/unenv/-/unenv-1.10.0.tgz", + "integrity": "sha512-wY5bskBQFL9n3Eca5XnhH6KbUo/tfvkwm9OpcdCvLaeA7piBNbavbOKJySEwQ1V0RH6HvNlSAFRTpvTqgKRQXQ==", "dependencies": { "consola": "^3.2.3", - "defu": "^6.1.3", + "defu": "^6.1.4", "mime": "^3.0.0", - "node-fetch-native": "^1.6.1", - "pathe": "^1.1.1" + "node-fetch-native": "^1.6.4", + "pathe": "^1.1.2" } }, "node_modules/unenv/node_modules/mime": { @@ -25088,38 +25085,38 @@ }, "packages/beacon-blockchain-substrate": { "name": "@airgap/beacon-blockchain-substrate", - "version": "4.2.2", + "version": "4.3.0", "license": "ISC", "dependencies": { - "@airgap/beacon-types": "4.2.2", - "@airgap/beacon-ui": "4.2.2" + "@airgap/beacon-types": "4.3.0", + "@airgap/beacon-ui": "4.3.0" } }, "packages/beacon-blockchain-tezos": { "name": "@airgap/beacon-blockchain-tezos", - "version": "4.2.2", + "version": "4.3.0", "license": "ISC", "dependencies": { - "@airgap/beacon-types": "4.2.2", - "@airgap/beacon-ui": "4.2.2" + "@airgap/beacon-types": "4.3.0", + "@airgap/beacon-ui": "4.3.0" } }, "packages/beacon-blockchain-tezos-sapling": { "name": "@airgap/beacon-blockchain-tezos-sapling", - "version": "4.2.2", + "version": "4.3.0", "license": "ISC", "dependencies": { - "@airgap/beacon-types": "4.2.2", - "@airgap/beacon-ui": "4.2.2" + "@airgap/beacon-types": "4.3.0", + "@airgap/beacon-ui": "4.3.0" } }, "packages/beacon-core": { "name": "@airgap/beacon-core", - "version": "4.2.2", + "version": "4.3.0", "license": "ISC", "dependencies": { - "@airgap/beacon-types": "4.2.2", - "@airgap/beacon-utils": "4.2.2", + "@airgap/beacon-types": "4.3.0", + "@airgap/beacon-utils": "4.3.0", "@stablelib/ed25519": "^1.0.3", "@stablelib/nacl": "^1.0.4", "@stablelib/utf8": "^1.0.1", @@ -25130,68 +25127,68 @@ }, "packages/beacon-dapp": { "name": "@airgap/beacon-dapp", - "version": "4.2.2", + "version": "4.3.0", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.2.2", - "@airgap/beacon-transport-matrix": "4.2.2", - "@airgap/beacon-transport-postmessage": "4.2.2", - "@airgap/beacon-transport-walletconnect": "4.2.2", - "@airgap/beacon-ui": "4.2.2", + "@airgap/beacon-core": "4.3.0", + "@airgap/beacon-transport-matrix": "4.3.0", + "@airgap/beacon-transport-postmessage": "4.3.0", + "@airgap/beacon-transport-walletconnect": "4.3.0", + "@airgap/beacon-ui": "4.3.0", "broadcast-channel": "^7.0.0" } }, "packages/beacon-sdk": { "name": "@airgap/beacon-sdk", - "version": "4.2.2", + "version": "4.3.0", "license": "ISC", "dependencies": { - "@airgap/beacon-blockchain-substrate": "4.2.2", - "@airgap/beacon-blockchain-tezos": "4.2.2", - "@airgap/beacon-core": "4.2.2", - "@airgap/beacon-dapp": "4.2.2", - "@airgap/beacon-transport-matrix": "4.2.2", - "@airgap/beacon-transport-postmessage": "4.2.2", - "@airgap/beacon-types": "4.2.2", - "@airgap/beacon-ui": "4.2.2", - "@airgap/beacon-utils": "4.2.2", - "@airgap/beacon-wallet": "4.2.2" + "@airgap/beacon-blockchain-substrate": "4.3.0", + "@airgap/beacon-blockchain-tezos": "4.3.0", + "@airgap/beacon-core": "4.3.0", + "@airgap/beacon-dapp": "4.3.0", + "@airgap/beacon-transport-matrix": "4.3.0", + "@airgap/beacon-transport-postmessage": "4.3.0", + "@airgap/beacon-types": "4.3.0", + "@airgap/beacon-ui": "4.3.0", + "@airgap/beacon-utils": "4.3.0", + "@airgap/beacon-wallet": "4.3.0" } }, "packages/beacon-transport-matrix": { "name": "@airgap/beacon-transport-matrix", - "version": "4.2.2", + "version": "4.3.0", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.2.2", - "@airgap/beacon-utils": "4.2.2", + "@airgap/beacon-core": "4.3.0", + "@airgap/beacon-utils": "4.3.0", "axios": "^1.6.2" } }, "packages/beacon-transport-postmessage": { "name": "@airgap/beacon-transport-postmessage", - "version": "4.2.2", + "version": "4.3.0", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.2.2", - "@airgap/beacon-types": "4.2.2", - "@airgap/beacon-utils": "4.2.2" + "@airgap/beacon-core": "4.3.0", + "@airgap/beacon-types": "4.3.0", + "@airgap/beacon-utils": "4.3.0" } }, "packages/beacon-transport-walletconnect": { "name": "@airgap/beacon-transport-walletconnect", - "version": "4.2.2", + "version": "4.3.0", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.2.2", - "@airgap/beacon-types": "4.2.2", - "@airgap/beacon-utils": "4.2.2", - "@walletconnect/sign-client": "2.11.2" + "@airgap/beacon-core": "4.3.0", + "@airgap/beacon-types": "4.3.0", + "@airgap/beacon-utils": "4.3.0", + "@walletconnect/sign-client": "2.14.0" } }, "packages/beacon-types": { "name": "@airgap/beacon-types", - "version": "4.2.2", + "version": "4.3.0", "license": "ISC", "dependencies": { "@types/chrome": "0.0.246" @@ -25199,14 +25196,14 @@ }, "packages/beacon-ui": { "name": "@airgap/beacon-ui", - "version": "4.2.2", + "version": "4.3.0", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.2.2", - "@airgap/beacon-transport-postmessage": "4.2.2", - "@airgap/beacon-types": "4.2.2", - "@airgap/beacon-utils": "4.2.2", - "@walletconnect/utils": "2.11.2", + "@airgap/beacon-core": "4.3.0", + "@airgap/beacon-transport-postmessage": "4.3.0", + "@airgap/beacon-types": "4.3.0", + "@airgap/beacon-utils": "4.3.0", + "@walletconnect/utils": "2.14.0", "qrcode-svg": "^1.1.0", "solid-js": "^1.7.11" }, @@ -25228,7 +25225,7 @@ }, "packages/beacon-utils": { "name": "@airgap/beacon-utils", - "version": "4.2.2", + "version": "4.3.0", "license": "ISC", "dependencies": { "@stablelib/ed25519": "^1.0.3", @@ -25240,12 +25237,12 @@ }, "packages/beacon-wallet": { "name": "@airgap/beacon-wallet", - "version": "4.2.2", + "version": "4.3.0", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.2.2", - "@airgap/beacon-transport-matrix": "4.2.2", - "@airgap/beacon-transport-postmessage": "4.2.2" + "@airgap/beacon-core": "4.3.0", + "@airgap/beacon-transport-matrix": "4.3.0", + "@airgap/beacon-transport-postmessage": "4.3.0" } } } diff --git a/package.json b/package.json index 0077f7882..d3665cb5c 100644 --- a/package.json +++ b/package.json @@ -72,9 +72,9 @@ "@airgap/beacon-ui": "file:packages/beacon-ui", "@airgap/beacon-utils": "file:packages/beacon-utils", "@airgap/beacon-wallet": "file:packages/beacon-wallet", - "@walletconnect/sign-client": "2.11.2", - "@walletconnect/types": "2.11.2", - "@walletconnect/utils": "2.11.2", + "@walletconnect/sign-client": "2.14.0", + "@walletconnect/types": "2.14.0", + "@walletconnect/utils": "2.14.0", "@web3modal/standalone": "2.0.0", "stream-browserify": "^3.0.0" }, diff --git a/packages/beacon-blockchain-substrate/package.json b/packages/beacon-blockchain-substrate/package.json index ea72f9a92..b0b48b9d1 100644 --- a/packages/beacon-blockchain-substrate/package.json +++ b/packages/beacon-blockchain-substrate/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-blockchain-substrate", - "version": "4.2.2", + "version": "4.3.0", "description": "This package adds support for `substrate` based blockchains. It can be used in combination with the `@airgap/beacon-dapp` or `@airgap/beacon-wallet` packages.", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", @@ -34,7 +34,7 @@ "url": "https://github.com/airgap-it/beacon-sdk/issues" }, "dependencies": { - "@airgap/beacon-types": "4.2.2", - "@airgap/beacon-ui": "4.2.2" + "@airgap/beacon-types": "4.3.0", + "@airgap/beacon-ui": "4.3.0" } } diff --git a/packages/beacon-blockchain-tezos-sapling/package.json b/packages/beacon-blockchain-tezos-sapling/package.json index 7c681836d..c727765f0 100644 --- a/packages/beacon-blockchain-tezos-sapling/package.json +++ b/packages/beacon-blockchain-tezos-sapling/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-blockchain-tezos-sapling", - "version": "4.2.2", + "version": "4.3.0", "description": "This package adds support for `tezos-sapling`, the sapling integration on the Tezos blockchain. It can be used in combination with the `@airgap/beacon-dapp` or `@airgap/beacon-wallet` packages.", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", @@ -34,7 +34,7 @@ "url": "https://github.com/airgap-it/beacon-sdk/issues" }, "dependencies": { - "@airgap/beacon-types": "4.2.2", - "@airgap/beacon-ui": "4.2.2" + "@airgap/beacon-types": "4.3.0", + "@airgap/beacon-ui": "4.3.0" } } diff --git a/packages/beacon-blockchain-tezos/package.json b/packages/beacon-blockchain-tezos/package.json index 4c10ef3e5..4b0f0a52c 100644 --- a/packages/beacon-blockchain-tezos/package.json +++ b/packages/beacon-blockchain-tezos/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-blockchain-tezos", - "version": "4.2.2", + "version": "4.3.0", "description": "This package adds support for the `tezos` blockchain. It can be used in combination with the `@airgap/beacon-dapp` or `@airgap/beacon-wallet` packages.", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", @@ -34,7 +34,7 @@ "url": "https://github.com/airgap-it/beacon-sdk/issues" }, "dependencies": { - "@airgap/beacon-types": "4.2.2", - "@airgap/beacon-ui": "4.2.2" + "@airgap/beacon-types": "4.3.0", + "@airgap/beacon-ui": "4.3.0" } } diff --git a/packages/beacon-core/package.json b/packages/beacon-core/package.json index a784331fa..83bf202b5 100644 --- a/packages/beacon-core/package.json +++ b/packages/beacon-core/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-core", - "version": "4.2.2", + "version": "4.3.0", "description": "This package contains internal methods that are used by both the dApp and wallet client.", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", @@ -34,8 +34,8 @@ "url": "https://github.com/airgap-it/beacon-sdk/issues" }, "dependencies": { - "@airgap/beacon-types": "4.2.2", - "@airgap/beacon-utils": "4.2.2", + "@airgap/beacon-types": "4.3.0", + "@airgap/beacon-utils": "4.3.0", "@stablelib/ed25519": "^1.0.3", "@stablelib/nacl": "^1.0.4", "@stablelib/utf8": "^1.0.1", diff --git a/packages/beacon-core/src/constants.ts b/packages/beacon-core/src/constants.ts index 8aef4d515..fca12c80a 100644 --- a/packages/beacon-core/src/constants.ts +++ b/packages/beacon-core/src/constants.ts @@ -1,4 +1,4 @@ -export const SDK_VERSION: string = '4.2.2' +export const SDK_VERSION: string = '4.3.0' export const BEACON_VERSION: string = '3' export const NOTIFICATION_ORACLE_URL: string = diff --git a/packages/beacon-dapp/package.json b/packages/beacon-dapp/package.json index e3eb2710c..ab85de39e 100644 --- a/packages/beacon-dapp/package.json +++ b/packages/beacon-dapp/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-dapp", - "version": "4.2.2", + "version": "4.3.0", "description": "Use this package on your dApp to instanciate a DAppClient object and communicate to wallets.", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", @@ -35,11 +35,11 @@ "url": "https://github.com/airgap-it/beacon-sdk/issues" }, "dependencies": { - "@airgap/beacon-core": "4.2.2", - "@airgap/beacon-transport-matrix": "4.2.2", - "@airgap/beacon-transport-postmessage": "4.2.2", - "@airgap/beacon-transport-walletconnect": "4.2.2", - "@airgap/beacon-ui": "4.2.2", + "@airgap/beacon-core": "4.3.0", + "@airgap/beacon-transport-matrix": "4.3.0", + "@airgap/beacon-transport-postmessage": "4.3.0", + "@airgap/beacon-transport-walletconnect": "4.3.0", + "@airgap/beacon-ui": "4.3.0", "broadcast-channel": "^7.0.0" } } diff --git a/packages/beacon-dapp/src/dapp-client/DAppClient.ts b/packages/beacon-dapp/src/dapp-client/DAppClient.ts index b4c62ca64..5028b77b1 100644 --- a/packages/beacon-dapp/src/dapp-client/DAppClient.ts +++ b/packages/beacon-dapp/src/dapp-client/DAppClient.ts @@ -509,11 +509,14 @@ export class DAppClient extends Client { } } - private prepareRequest(message: any, isV3 = false) { + private async prepareRequest(message: any, isV3 = false) { if (!this.multiTabChannel.isLeader()) { return } + // block until the transport is ready + await this._transport.promise + this.openRequestsOtherTabs.add(message.id) isV3 ? this.makeRequestV3(message.data, message.id) @@ -1071,6 +1074,14 @@ export class DAppClient extends Client { }) } + private async checkMakeRequest() { + const isResolved = this._transport.isResolved() + const isWCInstance = isResolved && (await this.transport) instanceof WalletConnectTransport + const isLeader = this.multiTabChannel.isLeader() + + return !isResolved || (isResolved && (!isWCInstance || (isWCInstance && isLeader))) + } + /** * Will remove the account from the local storage and set a new active account if necessary. * @@ -1359,7 +1370,7 @@ export class DAppClient extends Client { const logId = `makeRequestV3 ${Date.now()}` logger.time(true, logId) - const res = this.multiTabChannel.isLeader() + const res = (await this.checkMakeRequest()) ? this.makeRequestV3< BlockchainRequestV3, BeaconMessageWrapper> @@ -1428,9 +1439,7 @@ export class DAppClient extends Client { logger.time(true, logId) const res = - this.multiTabChannel.isLeader() || - !this._activeAccount.isResolved() || - !(await this.getActiveAccount()) + (await this.checkMakeRequest()) || !(await this.getActiveAccount()) ? this.makeRequest(request) : this.makeRequestBC(request) @@ -1508,7 +1517,7 @@ export class DAppClient extends Client { this.sendMetrics('performance-metrics/save', await this.buildPayload('message', 'start')) const logId = `makeRequest ${Date.now()}` logger.time(true, logId) - const res = this.multiTabChannel.isLeader() + const res = (await this.checkMakeRequest()) ? this.makeRequest(request) : this.makeRequestBC(request) @@ -1575,7 +1584,7 @@ export class DAppClient extends Client { const logId = `makeRequest ${Date.now()}` logger.time(true, logId) - const res = this.multiTabChannel.isLeader() + const res = (await this.checkMakeRequest()) ? this.makeRequest< SimulatedProofOfEventChallengeRequest, SimulatedProofOfEventChallengeResponse @@ -1675,7 +1684,7 @@ export class DAppClient extends Client { this.sendMetrics('performance-metrics/save', await this.buildPayload('message', 'start')) const logId = `makeRequest ${Date.now()}` logger.time(true, logId) - const res = this.multiTabChannel.isLeader() + const res = (await this.checkMakeRequest()) ? this.makeRequest(request) : this.makeRequestBC(request) @@ -1791,7 +1800,7 @@ export class DAppClient extends Client { const logId = `makeRequest ${Date.now()}` logger.time(true, logId) - const res = this.multiTabChannel.isLeader() + const res = (await this.checkMakeRequest()) ? this.makeRequest(request) : this.makeRequestBC(request) @@ -1851,7 +1860,7 @@ export class DAppClient extends Client { this.sendMetrics('performance-metrics/save', await this.buildPayload('message', 'start')) const logId = `makeRequest ${Date.now()}` logger.time(true, logId) - const res = this.multiTabChannel.isLeader() + const res = (await this.checkMakeRequest()) ? this.makeRequest(request) : this.makeRequestBC(request) @@ -2509,6 +2518,14 @@ export class DAppClient extends Client { return } + if (await this.addRequestAndCheckIfRateLimited()) { + this.events + .emit(BeaconEvent.LOCAL_RATE_LIMIT_REACHED) + .catch((emitError) => console.warn(emitError)) + + throw new Error('rate limit reached') + } + const id = await generateGUID() this.multiTabChannel.postMessage({ diff --git a/packages/beacon-sdk/package.json b/packages/beacon-sdk/package.json index 5dfe31337..92b42ed73 100644 --- a/packages/beacon-sdk/package.json +++ b/packages/beacon-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-sdk", - "version": "4.2.2", + "version": "4.3.0", "description": "The `beacon-sdk` simplifies and abstracts the communication between dApps and wallets over different transport layers.", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", @@ -35,15 +35,15 @@ "url": "https://github.com/airgap-it/beacon-sdk/issues" }, "dependencies": { - "@airgap/beacon-blockchain-substrate": "4.2.2", - "@airgap/beacon-blockchain-tezos": "4.2.2", - "@airgap/beacon-core": "4.2.2", - "@airgap/beacon-dapp": "4.2.2", - "@airgap/beacon-transport-matrix": "4.2.2", - "@airgap/beacon-transport-postmessage": "4.2.2", - "@airgap/beacon-types": "4.2.2", - "@airgap/beacon-ui": "4.2.2", - "@airgap/beacon-utils": "4.2.2", - "@airgap/beacon-wallet": "4.2.2" + "@airgap/beacon-blockchain-substrate": "4.3.0", + "@airgap/beacon-blockchain-tezos": "4.3.0", + "@airgap/beacon-core": "4.3.0", + "@airgap/beacon-dapp": "4.3.0", + "@airgap/beacon-transport-matrix": "4.3.0", + "@airgap/beacon-transport-postmessage": "4.3.0", + "@airgap/beacon-types": "4.3.0", + "@airgap/beacon-ui": "4.3.0", + "@airgap/beacon-utils": "4.3.0", + "@airgap/beacon-wallet": "4.3.0" } } diff --git a/packages/beacon-transport-matrix/package.json b/packages/beacon-transport-matrix/package.json index 31799b77e..2ee5c49e0 100644 --- a/packages/beacon-transport-matrix/package.json +++ b/packages/beacon-transport-matrix/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-transport-matrix", - "version": "4.2.2", + "version": "4.3.0", "description": "This package contains methods to facilitate communication over the Beacon network, a decentralised P2P network that is based on the matrix protocol.", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", @@ -34,8 +34,8 @@ "url": "https://github.com/airgap-it/beacon-sdk/issues" }, "dependencies": { - "@airgap/beacon-core": "4.2.2", - "@airgap/beacon-utils": "4.2.2", + "@airgap/beacon-core": "4.3.0", + "@airgap/beacon-utils": "4.3.0", "axios": "^1.6.2" } } diff --git a/packages/beacon-transport-postmessage/package.json b/packages/beacon-transport-postmessage/package.json index 1d110c278..4dce91db4 100644 --- a/packages/beacon-transport-postmessage/package.json +++ b/packages/beacon-transport-postmessage/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-transport-postmessage", - "version": "4.2.2", + "version": "4.3.0", "description": "This package contains methods to facilitate communication over the postmessage interface of the browser to talk to browser extensions.", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", @@ -34,8 +34,8 @@ "url": "https://github.com/airgap-it/beacon-sdk/issues" }, "dependencies": { - "@airgap/beacon-core": "4.2.2", - "@airgap/beacon-types": "4.2.2", - "@airgap/beacon-utils": "4.2.2" + "@airgap/beacon-core": "4.3.0", + "@airgap/beacon-types": "4.3.0", + "@airgap/beacon-utils": "4.3.0" } } diff --git a/packages/beacon-transport-walletconnect/package.json b/packages/beacon-transport-walletconnect/package.json index f2e0293f5..c768e781b 100644 --- a/packages/beacon-transport-walletconnect/package.json +++ b/packages/beacon-transport-walletconnect/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-transport-walletconnect", - "version": "4.2.2", + "version": "4.3.0", "description": "This package contains methods to facilitate communication over the WalletConnect network.", "author": "Papers AG", "homepage": "https://walletbeacon.io", @@ -34,9 +34,9 @@ "url": "https://github.com/airgap-it/beacon-sdk/issues" }, "dependencies": { - "@airgap/beacon-core": "4.2.2", - "@airgap/beacon-types": "4.2.2", - "@airgap/beacon-utils": "4.2.2", - "@walletconnect/sign-client": "2.11.2" + "@airgap/beacon-core": "4.3.0", + "@airgap/beacon-types": "4.3.0", + "@airgap/beacon-utils": "4.3.0", + "@walletconnect/sign-client": "2.14.0" } } diff --git a/packages/beacon-transport-walletconnect/src/communication-client/WalletConnectCommunicationClient.ts b/packages/beacon-transport-walletconnect/src/communication-client/WalletConnectCommunicationClient.ts index f0a9c6dd1..3af5be4c8 100644 --- a/packages/beacon-transport-walletconnect/src/communication-client/WalletConnectCommunicationClient.ts +++ b/packages/beacon-transport-walletconnect/src/communication-client/WalletConnectCommunicationClient.ts @@ -326,6 +326,10 @@ export class WalletConnectCommunicationClient extends CommunicationClient { } } + if (this.signClient && !this.isLeader() && this.isMobileOS()) { + await this.closeSignClient() + } + if (!publicKey) { throw new Error('Public Key in `tezos_getAccounts` is empty!') } @@ -538,9 +542,7 @@ export class WalletConnectCommunicationClient extends CommunicationClient { const signClient = await this.getSignClient() if (!signClient) { - const fun = this.eventHandlers.get(ClientEvents.CLOSE_ALERT) - fun && fun() - return + throw new Error('Failed to connect to the relayer.') } const lastIndex = signClient.session.keys.length - 1 @@ -582,7 +584,11 @@ export class WalletConnectCommunicationClient extends CommunicationClient { } } - const { uri, approval } = await signClient.connect(connectParams) + const { uri, approval } = await signClient.connect(connectParams).catch((error) => { + logger.error(`Init error: ${error.message}`) + localStorage && localStorage.setItem(StorageKey.WC_INIT_ERROR, error.message) + throw new Error(error.message) + }) // Extract topic from uri. Format is wc:topic@2... const topic = getStringBetween(uri, ':', '@') @@ -674,7 +680,7 @@ export class WalletConnectCommunicationClient extends CommunicationClient { }) .then(async () => { const isLeader = await this.isLeader() - if (!isLeader) { + if (!isLeader && !this.isMobileOS()) { await this.closeSignClient() } }) @@ -1308,13 +1314,34 @@ export class WalletConnectCommunicationClient extends CommunicationClient { return this.session } + private async tryConnectToRelayer() { + const urls = new Set([ + this.wcOptions.opts.relayUrl, + undefined, + 'wss://relay.walletconnect.com', + 'wss://relay.walletconnect.org' + ]) + const errMessages = new Set() + + for (const relayUrl of urls) { + try { + return await Client.init({ ...this.wcOptions.opts, relayUrl }) + } catch (err: any) { + errMessages.add(err.message) + logger.warn(`Failed to connect to ${relayUrl}: ${err.message}`) + } + } + throw new Error(`Failed to connect to relayer: ${Array.from(errMessages).join(',')}`) + } + private async getSignClient(): Promise { if (this.signClient === undefined) { try { - this.signClient = await Client.init(this.wcOptions.opts) + this.signClient = await this.tryConnectToRelayer() this.subscribeToSessionEvents(this.signClient) } catch (error: any) { logger.error(error.message) + localStorage && localStorage.setItem(StorageKey.WC_INIT_ERROR, error.message) return undefined } } diff --git a/packages/beacon-types/package.json b/packages/beacon-types/package.json index a32e9656f..ace3bb95b 100644 --- a/packages/beacon-types/package.json +++ b/packages/beacon-types/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-types", - "version": "4.2.2", + "version": "4.3.0", "description": "This package contains types that are used throughout the Beacon SDK.", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", diff --git a/packages/beacon-types/src/types/storage/StorageKey.ts b/packages/beacon-types/src/types/storage/StorageKey.ts index 183076188..5bf47b614 100644 --- a/packages/beacon-types/src/types/storage/StorageKey.ts +++ b/packages/beacon-types/src/types/storage/StorageKey.ts @@ -22,6 +22,7 @@ export enum StorageKey { MULTI_NODE_SETUP_DONE = 'beacon:multi-node-setup', USER_ID = 'beacon:user-id', ENABLE_METRICS = 'beacon:enable_metrics', + WC_INIT_ERROR = 'beacon:wc-init-error', WC_2_CORE_PAIRING = 'wc@2:core:0.3:pairing', WC_2_CLIENT_SESSION = 'wc@2:client:0.3:session', WC_2_CORE_KEYCHAIN = 'wc@2:core:0.3:keychain', diff --git a/packages/beacon-types/src/types/storage/StorageKeyReturnDefaults.ts b/packages/beacon-types/src/types/storage/StorageKeyReturnDefaults.ts index 6a79a409c..946e23fb5 100644 --- a/packages/beacon-types/src/types/storage/StorageKeyReturnDefaults.ts +++ b/packages/beacon-types/src/types/storage/StorageKeyReturnDefaults.ts @@ -30,6 +30,7 @@ export const defaultValues: StorageKeyReturnDefaults = { [StorageKey.WC_2_CLIENT_SESSION]: undefined, [StorageKey.USER_ID]: undefined, [StorageKey.ENABLE_METRICS]: undefined, + [StorageKey.WC_INIT_ERROR]: undefined, [StorageKey.WC_2_CORE_PAIRING]: undefined, [StorageKey.WC_2_CORE_KEYCHAIN]: undefined, [StorageKey.WC_2_CORE_MESSAGES]: undefined, diff --git a/packages/beacon-types/src/types/storage/StorageKeyReturnType.ts b/packages/beacon-types/src/types/storage/StorageKeyReturnType.ts index 54e59ad42..45406dd23 100644 --- a/packages/beacon-types/src/types/storage/StorageKeyReturnType.ts +++ b/packages/beacon-types/src/types/storage/StorageKeyReturnType.ts @@ -49,6 +49,7 @@ export interface StorageKeyReturnType { [StorageKey.MULTI_NODE_SETUP_DONE]: boolean | undefined [StorageKey.USER_ID]: string | undefined [StorageKey.ENABLE_METRICS]: boolean | undefined + [StorageKey.WC_INIT_ERROR]: string | undefined [StorageKey.WC_2_CLIENT_SESSION]: string | undefined [StorageKey.WC_2_CORE_PAIRING]: string | undefined [StorageKey.WC_2_CORE_KEYCHAIN]: string | undefined diff --git a/packages/beacon-ui/package.json b/packages/beacon-ui/package.json index 60b32bf56..a55fab032 100644 --- a/packages/beacon-ui/package.json +++ b/packages/beacon-ui/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-ui", - "version": "4.2.2", + "version": "4.3.0", "description": "This package contains the UI part (alerts and toasts) of the Beacon SDK.", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", @@ -34,11 +34,11 @@ "url": "https://github.com/airgap-it/beacon-sdk/issues" }, "dependencies": { - "@airgap/beacon-core": "4.2.2", - "@airgap/beacon-transport-postmessage": "4.2.2", - "@airgap/beacon-types": "4.2.2", - "@airgap/beacon-utils": "4.2.2", - "@walletconnect/utils": "2.11.2", + "@airgap/beacon-core": "4.3.0", + "@airgap/beacon-transport-postmessage": "4.3.0", + "@airgap/beacon-types": "4.3.0", + "@airgap/beacon-utils": "4.3.0", + "@walletconnect/utils": "2.14.0", "qrcode-svg": "^1.1.0", "solid-js": "^1.7.11" }, diff --git a/packages/beacon-ui/src/components/qr/index.tsx b/packages/beacon-ui/src/components/qr/index.tsx index 7144d4a7e..6422e0ce4 100644 --- a/packages/beacon-ui/src/components/qr/index.tsx +++ b/packages/beacon-ui/src/components/qr/index.tsx @@ -75,28 +75,6 @@ const QR: Component = (props: QRProps) => { {`Scan QR code with a ${ props.isWalletConnect ? 'WalletConnect' : 'Beacon' }-compatible wallet.`} - {props.onClickLearnMore && ( - { - if (props.onClickLearnMore) props.onClickLearnMore() - }} - > - Learn more - - )} - - )} - - {!props.isMobile && props.onClickLearnMore && ( - { - if (props.onClickLearnMore) props.onClickLearnMore() - }} - > - Learn more )} diff --git a/packages/beacon-ui/src/ui/alert/index.tsx b/packages/beacon-ui/src/ui/alert/index.tsx index f9d84f6a9..345bb3355 100644 --- a/packages/beacon-ui/src/ui/alert/index.tsx +++ b/packages/beacon-ui/src/ui/alert/index.tsx @@ -89,6 +89,7 @@ const [currentInfo, setCurrentInfo] = createSignal< const [analytics, setAnalytics] = createSignal(undefined) const [displayQrExtra, setDisplayQrExtra] = createSignal(false) const [pairingExpired, setPairingExpired] = createSignal(false) +const [isWCWorking, setIsWCWorking] = createSignal(true) type VoidFunction = () => void let dispose: null | VoidFunction = null @@ -451,21 +452,33 @@ const openAlert = async (config: AlertConfig): Promise => { // check whether the uri contains a valid symmetric key or not if (!parseUri(uri).symKey) { - handleCloseAlert() - setTimeout( - () => - openAlert({ - title: 'Error', - body: 'Network error occurred. Please check your internet connection.' - }), - 500 - ) - return '' + setIsWCWorking(false) } return uri } + const generateWCError = (title: string) => { + const errorMessage = localStorage ? localStorage.getItem(StorageKey.WC_INIT_ERROR) : undefined + const description: any = ( + <> +

A network error occurred.

+

+ This issue does not concern your wallet or dApp. If the problem persists, please report + it to the Beacon team{' '} + setCurrentInfo('help')} + > + here + +

+ {errorMessage && {errorMessage}} + + ) + return + } + const handleNewTab = async (config: AlertConfig, wallet?: MergedWallet) => { if (!wallet) { return @@ -594,6 +607,13 @@ const openAlert = async (config: AlertConfig): Promise => { if (wallet && wallet.supportedInteractionStandards?.includes('wallet_connect')) { const uri = await generateLink() + if (!uri && wallet?.name.toLowerCase().includes('kukai')) { + setCodeQR('error') + setInstallState(wallet) + setIsLoading(false) + return + } + if (uri) { if (_isMobileOS && wallet.types.includes('ios') && wallet.types.length === 1) { handleDeepLinking(wallet, uri) @@ -746,17 +766,25 @@ const openAlert = async (config: AlertConfig): Promise => { icon: currentWallet()?.image }) ) + const isConnected = + !currentWallet()?.supportedInteractionStandards?.includes('wallet_connect') || isWCWorking() return ( - + <> + {isConnected ? ( + + ) : ( + generateWCError(`Connect with ${currentWallet()?.name} Mobile`) + )} + ) } @@ -878,72 +906,78 @@ const openAlert = async (config: AlertConfig): Promise => { (currentWallet()?.types.length as number) <= 1 && ( )} - {isMobile() && currentWallet()?.types.includes('ios') && ( - { - const wallet = currentWallet() - - if (!wallet) { - return - } + {isMobile() && + currentWallet()?.types.includes('ios') && + (!currentWallet()?.supportedInteractionStandards?.includes( + 'wallet_connect' + ) || isWCWorking() ? ( + { + const wallet = currentWallet() + + if (!wallet) { + return + } - let syncCode = '' - if ( - wallet.supportedInteractionStandards?.includes('wallet_connect') - ) { - syncCode = (await wcPayload)?.uri ?? '' - } else { - syncCode = await new Serializer().serialize(await p2pPayload) + let syncCode = '' + if ( + wallet.supportedInteractionStandards?.includes('wallet_connect') + ) { + syncCode = (await wcPayload)?.uri ?? '' + } else { + syncCode = await new Serializer().serialize(await p2pPayload) + } + handleDeepLinking(wallet, syncCode) } - handleDeepLinking(wallet, syncCode) } + ]} + downloadLink={ + currentWallet()?.name.toLowerCase().includes('kukai') && isIOS(window) + ? { + label: 'Get Kukai Mobile >', + url: 'https://ios.kukai.app' + } + : undefined } - ]} - downloadLink={ - currentWallet()?.name.toLowerCase().includes('kukai') && isIOS(window) - ? { - label: 'Get Kukai Mobile >', - url: 'https://ios.kukai.app' - } - : undefined - } - onShowQRCodeClick={async () => { - const syncCode = - currentWallet()?.supportedInteractionStandards?.includes( - 'wallet_connect' - ) - ? (await wcPayload)?.uri ?? '' - : await new Serializer().serialize(await p2pPayload) - - const wallet = currentWallet() - - if (!syncCode.length || !wallet) { - handleCloseAlert() - return - } + onShowQRCodeClick={async () => { + const syncCode = + currentWallet()?.supportedInteractionStandards?.includes( + 'wallet_connect' + ) + ? (await wcPayload)?.uri ?? '' + : await new Serializer().serialize(await p2pPayload) + + const wallet = currentWallet() + + if (!syncCode.length || !wallet) { + handleCloseAlert() + return + } - if ( - _isMobileOS && - wallet.types.includes('ios') && - wallet.types.length === 1 - ) { - handleDeepLinking(wallet, syncCode) - } else { - setCodeQR(syncCode) - } + if ( + _isMobileOS && + wallet.types.includes('ios') && + wallet.types.length === 1 + ) { + handleDeepLinking(wallet, syncCode) + } else { + setCodeQR(syncCode) + } - setCurrentInfo('qr') - setDisplayQrExtra(true) - }} - /> - )} + setCurrentInfo('qr') + setDisplayQrExtra(true) + }} + /> + ) : ( + generateWCError(`Connect with ${currentWallet()?.name} Mobile`) + ))} )} {currentInfo() === 'qr' && ( diff --git a/packages/beacon-utils/package.json b/packages/beacon-utils/package.json index 77dd85924..0f43f3c6d 100644 --- a/packages/beacon-utils/package.json +++ b/packages/beacon-utils/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-utils", - "version": "4.2.2", + "version": "4.3.0", "description": "This package contains utility functions that are used throughout the beacon-sdk", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", diff --git a/packages/beacon-wallet/package.json b/packages/beacon-wallet/package.json index 1bd6c1285..6a145db96 100644 --- a/packages/beacon-wallet/package.json +++ b/packages/beacon-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@airgap/beacon-wallet", - "version": "4.2.2", + "version": "4.3.0", "description": "Use this package in your wallet to instanciate a WalletClient object and communicate to dApps.", "author": "Andreas Gassmann ", "homepage": "https://walletbeacon.io", @@ -35,8 +35,8 @@ "url": "https://github.com/airgap-it/beacon-sdk/issues" }, "dependencies": { - "@airgap/beacon-core": "4.2.2", - "@airgap/beacon-transport-matrix": "4.2.2", - "@airgap/beacon-transport-postmessage": "4.2.2" + "@airgap/beacon-core": "4.3.0", + "@airgap/beacon-transport-matrix": "4.3.0", + "@airgap/beacon-transport-postmessage": "4.3.0" } }