Skip to content

Commit 392c797

Browse files
committed
v13.0.16: fix login with wallet
1 parent b808380 commit 392c797

20 files changed

+133
-28
lines changed

dev.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1332,7 +1332,7 @@ <h5 class="px-4">Login with wallet</h5>
13321332
button.addEventListener("click",async function(e){
13331333
let dateTime = new Date().toISOString().slice(0, 19);
13341334
let { account, wallet } = await DePayWidgets.Login({
1335-
wallets: { allow:['MetaMask'] },
1335+
loginWith: 'MetaMask',
13361336
message: `Click to log in to DePay and to accept DePay's Terms of Service: https://depay.com/legal/terms\n${dateTime}`
13371337
})
13381338
console.log("Logged in via signature account", account)

dist/esm/index.bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/esm/index.evm.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6881,6 +6881,9 @@ var ConnectStack = (function (props) {
68816881
open = _useContext.open,
68826882
close = _useContext.close;
68836883

6884+
var _useContext2 = useContext(ConfigurationContext),
6885+
loginWith = _useContext2.loginWith;
6886+
68846887
var _useState = useState(),
68856888
_useState2 = _slicedToArray$1(_useState, 2),
68866889
wallet = _useState2[0],
@@ -7151,6 +7154,17 @@ var ConnectStack = (function (props) {
71517154
useEffect(function () {
71527155
delete localStorage['WALLETCONNECT_DEEPLINK_CHOICE'];
71537156
}, []);
7157+
useEffect(function () {
7158+
if (loginWith) {
7159+
var foundWallet = allWallets.find(function (wallet) {
7160+
return wallet.name == loginWith;
7161+
});
7162+
7163+
if (foundWallet) {
7164+
connectExtension(foundWallet);
7165+
}
7166+
}
7167+
}, []);
71547168
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ReactDialogStack, {
71557169
open: open,
71567170
close: close,
@@ -8998,7 +9012,7 @@ var WalletProvider = (function (props) {
89989012

89999013
var Login = function Login(options) {
90009014
requireReactVersion();
9001-
var style, error, document, message, endpoint, recover, wallet, wallets;
9015+
var style, error, document, message, endpoint, recover, wallet, wallets, loginWith;
90029016

90039017
if (_typeof$1(options) == 'object') {
90049018
style = options.style;
@@ -9009,6 +9023,7 @@ var Login = function Login(options) {
90099023
recover = options.recover;
90109024
wallet = options.wallet;
90119025
wallets = options.wallets;
9026+
loginWith = options.loginWith;
90129027
}
90139028

90149029
return new Promise( /*#__PURE__*/function () {
@@ -9037,7 +9052,8 @@ var Login = function Login(options) {
90379052
endpoint: endpoint || '/login',
90389053
recoverSignature: recover,
90399054
wallet: wallet,
9040-
wallets: wallets
9055+
wallets: wallets,
9056+
loginWith: loginWith
90419057
}
90429058
}, /*#__PURE__*/React.createElement(UpdatableProvider, null, /*#__PURE__*/React.createElement(ClosableProvider, {
90439059
unmount: userClosedDialog

dist/esm/index.evm.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/esm/index.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6883,6 +6883,9 @@ var ConnectStack = (function (props) {
68836883
open = _useContext.open,
68846884
close = _useContext.close;
68856885

6886+
var _useContext2 = useContext(ConfigurationContext),
6887+
loginWith = _useContext2.loginWith;
6888+
68866889
var _useState = useState(),
68876890
_useState2 = _slicedToArray(_useState, 2),
68886891
wallet = _useState2[0],
@@ -7153,6 +7156,17 @@ var ConnectStack = (function (props) {
71537156
useEffect(function () {
71547157
delete localStorage['WALLETCONNECT_DEEPLINK_CHOICE'];
71557158
}, []);
7159+
useEffect(function () {
7160+
if (loginWith) {
7161+
var foundWallet = allWallets.find(function (wallet) {
7162+
return wallet.name == loginWith;
7163+
});
7164+
7165+
if (foundWallet) {
7166+
connectExtension(foundWallet);
7167+
}
7168+
}
7169+
}, []);
71567170
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ReactDialogStack, {
71577171
open: open,
71587172
close: close,
@@ -8945,7 +8959,7 @@ var WalletProvider = (function (props) {
89458959

89468960
var Login = function Login(options) {
89478961
requireReactVersion();
8948-
var style, error, document, message, endpoint, recover, wallet, wallets;
8962+
var style, error, document, message, endpoint, recover, wallet, wallets, loginWith;
89498963

89508964
if (_typeof(options) == 'object') {
89518965
style = options.style;
@@ -8956,6 +8970,7 @@ var Login = function Login(options) {
89568970
recover = options.recover;
89578971
wallet = options.wallet;
89588972
wallets = options.wallets;
8973+
loginWith = options.loginWith;
89598974
}
89608975

89618976
return new Promise( /*#__PURE__*/function () {
@@ -8984,7 +8999,8 @@ var Login = function Login(options) {
89848999
endpoint: endpoint || '/login',
89859000
recoverSignature: recover,
89869001
wallet: wallet,
8987-
wallets: wallets
9002+
wallets: wallets,
9003+
loginWith: loginWith
89889004
}
89899005
}, /*#__PURE__*/React.createElement(UpdatableProvider, null, /*#__PURE__*/React.createElement(ClosableProvider, {
89909006
unmount: userClosedDialog

dist/esm/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/esm/index.svm.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6882,6 +6882,9 @@ var ConnectStack = (function (props) {
68826882
open = _useContext.open,
68836883
close = _useContext.close;
68846884

6885+
var _useContext2 = useContext(ConfigurationContext),
6886+
loginWith = _useContext2.loginWith;
6887+
68856888
var _useState = useState(),
68866889
_useState2 = _slicedToArray(_useState, 2),
68876890
wallet = _useState2[0],
@@ -7152,6 +7155,17 @@ var ConnectStack = (function (props) {
71527155
useEffect(function () {
71537156
delete localStorage['WALLETCONNECT_DEEPLINK_CHOICE'];
71547157
}, []);
7158+
useEffect(function () {
7159+
if (loginWith) {
7160+
var foundWallet = allWallets.find(function (wallet) {
7161+
return wallet.name == loginWith;
7162+
});
7163+
7164+
if (foundWallet) {
7165+
connectExtension(foundWallet);
7166+
}
7167+
}
7168+
}, []);
71557169
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ReactDialogStack, {
71567170
open: open,
71577171
close: close,
@@ -8999,7 +9013,7 @@ var WalletProvider = (function (props) {
89999013

90009014
var Login = function Login(options) {
90019015
requireReactVersion();
9002-
var style, error, document, message, endpoint, recover, wallet, wallets;
9016+
var style, error, document, message, endpoint, recover, wallet, wallets, loginWith;
90039017

90049018
if (_typeof(options) == 'object') {
90059019
style = options.style;
@@ -9010,6 +9024,7 @@ var Login = function Login(options) {
90109024
recover = options.recover;
90119025
wallet = options.wallet;
90129026
wallets = options.wallets;
9027+
loginWith = options.loginWith;
90139028
}
90149029

90159030
return new Promise( /*#__PURE__*/function () {
@@ -9038,7 +9053,8 @@ var Login = function Login(options) {
90389053
endpoint: endpoint || '/login',
90399054
recoverSignature: recover,
90409055
wallet: wallet,
9041-
wallets: wallets
9056+
wallets: wallets,
9057+
loginWith: loginWith
90429058
}
90439059
}, /*#__PURE__*/React.createElement(UpdatableProvider, null, /*#__PURE__*/React.createElement(ClosableProvider, {
90449060
unmount: userClosedDialog

dist/esm/index.svm.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/umd/index.bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/umd/index.evm.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6880,6 +6880,9 @@
68806880
open = _useContext.open,
68816881
close = _useContext.close;
68826882

6883+
var _useContext2 = React.useContext(ConfigurationContext),
6884+
loginWith = _useContext2.loginWith;
6885+
68836886
var _useState = React.useState(),
68846887
_useState2 = _slicedToArray$1(_useState, 2),
68856888
wallet = _useState2[0],
@@ -7150,6 +7153,17 @@
71507153
React.useEffect(function () {
71517154
delete localStorage['WALLETCONNECT_DEEPLINK_CHOICE'];
71527155
}, []);
7156+
React.useEffect(function () {
7157+
if (loginWith) {
7158+
var foundWallet = allWallets.find(function (wallet) {
7159+
return wallet.name == loginWith;
7160+
});
7161+
7162+
if (foundWallet) {
7163+
connectExtension(foundWallet);
7164+
}
7165+
}
7166+
}, []);
71537167
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(reactDialogStack.ReactDialogStack, {
71547168
open: open,
71557169
close: close,
@@ -8997,7 +9011,7 @@
89979011

89989012
var Login = function Login(options) {
89999013
requireReactVersion();
9000-
var style, error, document, message, endpoint, recover, wallet, wallets;
9014+
var style, error, document, message, endpoint, recover, wallet, wallets, loginWith;
90019015

90029016
if (_typeof$1(options) == 'object') {
90039017
style = options.style;
@@ -9008,6 +9022,7 @@
90089022
recover = options.recover;
90099023
wallet = options.wallet;
90109024
wallets = options.wallets;
9025+
loginWith = options.loginWith;
90119026
}
90129027

90139028
return new Promise( /*#__PURE__*/function () {
@@ -9036,7 +9051,8 @@
90369051
endpoint: endpoint || '/login',
90379052
recoverSignature: recover,
90389053
wallet: wallet,
9039-
wallets: wallets
9054+
wallets: wallets,
9055+
loginWith: loginWith
90409056
}
90419057
}, /*#__PURE__*/React__default['default'].createElement(UpdatableProvider, null, /*#__PURE__*/React__default['default'].createElement(ClosableProvider, {
90429058
unmount: userClosedDialog

0 commit comments

Comments
 (0)