diff --git a/package.json b/package.json
index e76e8511..c42743de 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "app",
- "version": "0.1.6.1",
+ "version": "0.1.6.2",
"private": true,
"dependencies": {
"@apollo/react-hooks": "^3.1.3",
diff --git a/src/components/auth/views/QRLogin.tsx b/src/components/auth/views/QRLogin.tsx
index db581805..25910a9f 100644
--- a/src/components/auth/views/QRLogin.tsx
+++ b/src/components/auth/views/QRLogin.tsx
@@ -127,8 +127,9 @@ export const QRLogin = ({ handleSet }: QRLoginProps) => {
return (
- Make sure you have given ThunderHub the correct
- permissions to use the camara.
+ Make sure you have a camara available and that you
+ have given ThunderHub the correct permissions to use
+ it.
);
diff --git a/src/components/connectionCheck/ConnectionCheck.tsx b/src/components/connectionCheck/ConnectionCheck.tsx
index be67e327..69cb3ea7 100644
--- a/src/components/connectionCheck/ConnectionCheck.tsx
+++ b/src/components/connectionCheck/ConnectionCheck.tsx
@@ -1,3 +1,4 @@
+import { useEffect } from 'react';
import {
useConnectionState,
useConnectionDispatch,
@@ -18,16 +19,19 @@ export const ConnectionCheck = () => {
cert,
);
- useQuery(GET_CAN_CONNECT, {
+ const { data, loading } = useQuery(GET_CAN_CONNECT, {
variables: { auth },
skip: connected || !loggedIn,
onError: () => {
dispatch({ type: 'error' });
},
- onCompleted: () => {
- dispatch({ type: 'connected' });
- },
});
+ useEffect(() => {
+ if (!loading && data && data.getNodeInfo) {
+ dispatch({ type: 'connected' });
+ }
+ }, [data, loading]);
+
return null;
};
diff --git a/src/context/ConnectionContext.tsx b/src/context/ConnectionContext.tsx
index ad59a1bc..0bddc292 100644
--- a/src/context/ConnectionContext.tsx
+++ b/src/context/ConnectionContext.tsx
@@ -20,7 +20,6 @@ const stateReducer = (state: State, action: ActionType) => {
case 'connected':
return { connected: true, loading: false, error: false };
case 'loading':
- return { connected: false, loading: true, error: false };
case 'disconnected':
return { connected: false, loading: true, error: false };
default:
diff --git a/src/views/settings/Account.tsx b/src/views/settings/Account.tsx
index 4ac79a7c..02b44bfa 100644
--- a/src/views/settings/Account.tsx
+++ b/src/views/settings/Account.tsx
@@ -57,6 +57,12 @@ export const AccountSettings = () => {
>
BTCPayServer Info
+ setIsType('qrcode')}
+ >
+ QR Code
+
);
@@ -71,14 +77,21 @@ export const AccountSettings = () => {
{getStorageSaved().map((entry, index) => {
return (
{
- dispatch({ type: 'disconnected' });
- dispatchState({ type: 'disconnected' });
- changeAccount(entry.index);
- push('/');
+ if (
+ name.localeCompare(entry.name) !== 0
+ ) {
+ dispatch({ type: 'disconnected' });
+ dispatchState({
+ type: 'disconnected',
+ });
+ changeAccount(entry.index);
+ push('/');
+ }
}}
>
{entry.name}
diff --git a/src/views/settings/Current.tsx b/src/views/settings/Current.tsx
index e842d50b..e6da66e1 100644
--- a/src/views/settings/Current.tsx
+++ b/src/views/settings/Current.tsx
@@ -35,9 +35,7 @@ export const CurrentSettings = () => {
return (
<>
{title}
-
- {field}
-
+
>
);
};