Skip to content

Commit

Permalink
v16.3.9: do not recover coinbase connections
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNe0x1 committed Jan 5, 2024
1 parent 4f4a083 commit 577bd07
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 12 deletions.
8 changes: 7 additions & 1 deletion dist/esm/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -1903,6 +1903,12 @@ class WalletLink {
this.name = this.constructor.info.name;
this.logo = this.constructor.info.logo;
this.blockchains = this.constructor.info.blockchains;
// RESET WalletLink (do not recover connections!)
Object.keys(localStorage).forEach((key)=>{
if(key.match("-walletlink:https://www.walletlink.org")) {
delete localStorage[key];
}
});
this.connector = WalletLink.instance || this.newWalletLinkInstance();
this.sendTransaction = (transaction)=>{
return sendTransaction({
Expand All @@ -1923,8 +1929,8 @@ class WalletLink {
}

async connect(options) {
let connect = (options && options.connect) ? options.connect : ({uri})=>{};

let connect = (options && options.connect) ? options.connect : ({uri})=>{};
await connect({ uri: this.connector.qrUrl });

_optionalChain([document, 'access', _ => _.querySelector, 'call', _2 => _2('.-cbwsdk-css-reset'), 'optionalAccess', _3 => _3.setAttribute, 'call', _4 => _4('style', 'display: none;')]);
Expand Down
8 changes: 7 additions & 1 deletion dist/esm/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion dist/umd/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -1906,6 +1906,12 @@
this.name = this.constructor.info.name;
this.logo = this.constructor.info.logo;
this.blockchains = this.constructor.info.blockchains;
// RESET WalletLink (do not recover connections!)
Object.keys(localStorage).forEach((key)=>{
if(key.match("-walletlink:https://www.walletlink.org")) {
delete localStorage[key];
}
});
this.connector = WalletLink.instance || this.newWalletLinkInstance();
this.sendTransaction = (transaction)=>{
return sendTransaction({
Expand All @@ -1926,8 +1932,8 @@
}

async connect(options) {
let connect = (options && options.connect) ? options.connect : ({uri})=>{};

let connect = (options && options.connect) ? options.connect : ({uri})=>{};
await connect({ uri: this.connector.qrUrl });

_optionalChain([document, 'access', _ => _.querySelector, 'call', _2 => _2('.-cbwsdk-css-reset'), 'optionalAccess', _3 => _3.setAttribute, 'call', _4 => _4('style', 'display: none;')]);
Expand Down
8 changes: 7 additions & 1 deletion dist/umd/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.evm.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-wallets-evm",
"moduleName": "Web3Wallets",
"version": "16.3.8",
"version": "16.3.9",
"description": "One-Stop-Shop JavaScript library to integrate various web3 crypto wallets and multiple blockchains at once with a single interface.",
"main": "dist/umd/index.evm.js",
"module": "dist/esm/index.evm.js",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-wallets",
"moduleName": "Web3Wallets",
"version": "16.3.8",
"version": "16.3.9",
"description": "One-Stop-Shop JavaScript library to integrate various web3 crypto wallets and multiple blockchains at once with a single interface.",
"main": "dist/umd/index.js",
"module": "dist/esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion package.solana.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-wallets-solana",
"moduleName": "Web3Wallets",
"version": "16.3.8",
"version": "16.3.9",
"description": "One-Stop-Shop JavaScript library to integrate various web3 crypto wallets and multiple blockchains at once with a single interface.",
"main": "dist/umd/index.solana.js",
"module": "dist/esm/index.solana.js",
Expand Down
8 changes: 7 additions & 1 deletion src/wallets/WalletLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ class WalletLink {
this.name = this.constructor.info.name
this.logo = this.constructor.info.logo
this.blockchains = this.constructor.info.blockchains
// RESET WalletLink (do not recover connections!)
Object.keys(localStorage).forEach((key)=>{
if(key.match("-walletlink:https://www.walletlink.org")) {
delete localStorage[key]
}
})
this.connector = WalletLink.instance || this.newWalletLinkInstance()
this.sendTransaction = (transaction)=>{
return sendTransaction({
Expand All @@ -61,8 +67,8 @@ class WalletLink {
}

async connect(options) {
let connect = (options && options.connect) ? options.connect : ({uri})=>{}

let connect = (options && options.connect) ? options.connect : ({uri})=>{}
await connect({ uri: this.connector.qrUrl })

document.querySelector('.-cbwsdk-css-reset')?.setAttribute('style', 'display: none;')
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -926,10 +926,10 @@
stream-browserify "^3.0.0"
util "^0.12.4"

"@depay/[email protected].2":
version "3.8.2"
resolved "https://registry.yarnpkg.com/@depay/coinbase-wallet-sdk/-/coinbase-wallet-sdk-3.8.2.tgz#f27ab1bde4042bcb233c7d57c19feffb2d9f1e84"
integrity sha512-x3vJifXaae6gA+YS+6tAv7nRyHW2yYSLlD/F1GPK4cC2q70sbZ90wJ9DzyHADn2Fwh0iMA8/c4p7TdVk3WwgNQ==
"@depay/coinbase-wallet-sdk@^3.8.3":
version "3.8.3"
resolved "https://registry.yarnpkg.com/@depay/coinbase-wallet-sdk/-/coinbase-wallet-sdk-3.8.3.tgz#1087a75a5f14aab281aa6b40a69c4f11d08836e3"
integrity sha512-dF+nEoznHQ332QSBWSrKt9YYVXFKriC5FrXaxx3g+a7NrNvEQ+V9XhR083IcU6QxVZvDJKrxo783Flj/lCt9cQ==
dependencies:
"@coinbase/wallet-sdk" "3.7.2"

Expand Down

0 comments on commit 577bd07

Please sign in to comment.