Compare commits

...
Author SHA1 Message Date
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
0eed017bb9 Version Packages (#1889)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-01 16:06:38 -07:00
Joaquim VergesandGitHub 789700cf60 [React] Fix sign in button display logic (#1888) 2023-11-01 22:56:00 +00:00
9 changed files with 31 additions and 9 deletions
+2
View File
@@ -1,5 +1,7 @@
# @thirdweb-dev/react-core
## 4.1.1
## 4.1.0
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react-core",
"version": "4.1.0",
"version": "4.1.1",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
@@ -1,5 +1,7 @@
# @thirdweb-dev/react-native-compat
## 0.4.1
## 0.4.0
## 0.3.16
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@thirdweb-dev/react-native-compat",
"description": "Shims for Thirdweb in React Native Projects",
"version": "0.4.0",
"version": "0.4.1",
"author": "thirdweb eng <[email protected]>",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native-compat",
"license": "Apache-2.0",
+7
View File
@@ -1,5 +1,12 @@
# @thirdweb-dev/react-native
## 0.4.1
### Patch Changes
- Updated dependencies []:
- @thirdweb-dev/react-core@4.1.1
## 0.4.0
### Minor Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react-native",
"version": "0.4.0",
"version": "0.4.1",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
+9
View File
@@ -1,5 +1,14 @@
# @thirdweb-dev/react
## 4.1.1
### Patch Changes
- [#1888](https://github.com/thirdweb-dev/js/pull/1888) [`789700cf`](https://github.com/thirdweb-dev/js/commit/789700cf60ac40d4cc2742c8aa735a225089c522) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Fix sign in connect button display logic
- Updated dependencies []:
- @thirdweb-dev/react-core@4.1.1
## 4.1.0
### Minor Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react",
"version": "4.1.0",
"version": "4.1.1",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
@@ -169,12 +169,14 @@ export const ConnectWallet: React.FC<ConnectWalletProps> = (props) => {
const { user } = useUser();
const disconnect = useDisconnect();
const shouldSignIn = !!authConfig?.authUrl && !!address && !user?.address;
const addressAndUserAddressMismatched = address !== user?.address;
const connectedButNotSignedIn =
!!authConfig?.authUrl &&
!!address &&
(!user?.address || address !== user?.address);
const requiresSignIn = props.auth?.loginOptional
? false
: shouldSignIn || addressAndUserAddressMismatched;
: connectedButNotSignedIn;
const supportedTokens = useMemo(() => {
if (!props.supportedTokens) {
@@ -195,10 +197,10 @@ export const ConnectWallet: React.FC<ConnectWalletProps> = (props) => {
// if wallet gets disconnected, close the signature modal
useEffect(() => {
if (!activeWallet && !addressAndUserAddressMismatched) {
if (!activeWallet) {
setShowSignatureModal(false);
}
}, [activeWallet, addressAndUserAddressMismatched]);
}, [activeWallet]);
return (
<CustomThemeProvider theme={theme}>