diff --git a/src/App-styles.ts b/src/App-styles.ts
index c2a036f..bf3a146 100644
--- a/src/App-styles.ts
+++ b/src/App-styles.ts
@@ -77,7 +77,7 @@ display: flex;
border: 1px solid var(--50-white, rgba(255, 255, 255, 0.5));
justify-content: space-between;
align-items: center;
-width: 140px;
+width: auto;
height: 25px;
padding: 5px 15px 5px 15px;
gap: 5px;
diff --git a/src/App.tsx b/src/App.tsx
index 5ffe85d..0331c74 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -1244,7 +1244,8 @@ function App() {
@@ -1391,10 +1392,11 @@ function App() {
textDecoration: "underline",
}}
onClick={async () => {
- window.electronAPI.openExternal("https://www.qort.trade");
+ executeEvent("addTab", { data: { service: 'APP', name: 'q-trade' } });
+ executeEvent("open-apps-mode", { });
}}
>
- Get QORT at qort.trade
+ Get QORT at Q-Trade
)}
diff --git a/src/background.ts b/src/background.ts
index 3ea255a..c339bbc 100644
--- a/src/background.ts
+++ b/src/background.ts
@@ -1424,6 +1424,16 @@ async function sendChatForBuyOrder({ qortAddress, recipientPublicKey, message, a
const _encryptedMessage = tx._encryptedMessage;
const encryptedMessageToBase58 = Base58.encode(_encryptedMessage);
const signature = "id-" + Date.now() + "-" + Math.floor(Math.random() * 1000)
+ const checkGatewayStatusRes = await fetch(`${buyTradeNodeBaseUrl}/admin/status`)
+ const checkGatewayStatusData = await checkGatewayStatusRes.json()
+ if(+checkGatewayStatusData?.syncPercent !== 100 || checkGatewayStatusData?.isSynchronizing !== false){
+ throw new Error("Cannot make trade. Gateway node is synchronizing")
+ }
+ const healthCheckRes = await fetch('https://www.qort.trade/api/transaction/healthcheck')
+ const healthcheckData = await healthCheckRes.json()
+ if(healthcheckData?.dbConnection !== 'healthy'){
+ throw new Error('Could not connect to db. Try again later.')
+ }
const res = await axios.post(
`https://www.qort.trade/api/transaction/updatetxgateway`,
{
diff --git a/src/components/Chat/MessageDisplay.tsx b/src/components/Chat/MessageDisplay.tsx
index 0800186..637b4d4 100644
--- a/src/components/Chat/MessageDisplay.tsx
+++ b/src/components/Chat/MessageDisplay.tsx
@@ -92,7 +92,7 @@ export const MessageDisplay = ({ htmlContent, isReply }) => {
if (res) {
const { service, name, identifier, path } = res;
executeEvent("addTab", { data: { service, name, identifier, path } });
- executeEvent("open-dev-mode", { });
+ executeEvent("open-apps-mode", { });
}
}
diff --git a/src/components/Group/Group.tsx b/src/components/Group/Group.tsx
index 552b251..d576e0b 100644
--- a/src/components/Group/Group.tsx
+++ b/src/components/Group/Group.tsx
@@ -1303,7 +1303,7 @@ export const Group = ({
};
}, []);
- const openDevModeFunc = () => {
+ const openAppsMode = () => {
if (isMobile) {
setMobileViewMode("apps");
}
@@ -1311,34 +1311,37 @@ export const Group = ({
setDesktopViewMode('apps')
}
- setIsOpenSideViewDirects(false)
- setIsOpenSideViewGroups(false)
- setGroupSection("default");
- setSelectedGroup(null);
- setNewChat(false);
- setSelectedDirect(null);
- setSecretKey(null);
- setGroupOwner(null)
- lastFetchedSecretKey.current = null;
- initiatedGetMembers.current = false;
- setSecretKeyPublishDate(null);
- setAdmins([]);
- setSecretKeyDetails(null);
- setAdminsWithNames([]);
- setMembers([]);
- setMemberCountFromSecretKeyData(null);
- setTriedToFetchSecretKey(false);
- setFirstSecretKeyInCreation(false);
- setIsOpenSideViewDirects(false)
- setIsOpenSideViewGroups(false)
+ if(isMobile){
+ setIsOpenSideViewDirects(false)
+ setIsOpenSideViewGroups(false)
+ setGroupSection("default");
+ setSelectedGroup(null);
+ setNewChat(false);
+ setSelectedDirect(null);
+ setSecretKey(null);
+ setGroupOwner(null)
+ lastFetchedSecretKey.current = null;
+ initiatedGetMembers.current = false;
+ setSecretKeyPublishDate(null);
+ setAdmins([]);
+ setSecretKeyDetails(null);
+ setAdminsWithNames([]);
+ setMembers([]);
+ setMemberCountFromSecretKeyData(null);
+ setTriedToFetchSecretKey(false);
+ setFirstSecretKeyInCreation(false);
+ setIsOpenSideViewDirects(false)
+ setIsOpenSideViewGroups(false)
+ }
+
};
useEffect(() => {
- subscribeToEvent("open-dev-mode", openDevModeFunc);
+ subscribeToEvent("open-apps-mode", openAppsMode);
return () => {
- unsubscribeFromEvent("open-dev-mode", openDevModeFunc);
+ unsubscribeFromEvent("open-apps-mode", openAppsMode);
};
}, []);
diff --git a/src/components/Group/ThingsToDoInitial.tsx b/src/components/Group/ThingsToDoInitial.tsx
index 28c3889..7b870df 100644
--- a/src/components/Group/ThingsToDoInitial.tsx
+++ b/src/components/Group/ThingsToDoInitial.tsx
@@ -212,7 +212,7 @@ export const ThingsToDoInitial = ({ myAddress, name, hasGroups, balance }) => {
fontSize: "13px",
fontWeight: 400,
},
- }} primary={`Join a group hub`} />
+ }} primary={`Join a group`} />
diff --git a/src/components/Mobile/MobileFooter.tsx b/src/components/Mobile/MobileFooter.tsx
index 256b629..7179f6e 100644
--- a/src/components/Mobile/MobileFooter.tsx
+++ b/src/components/Mobile/MobileFooter.tsx
@@ -16,6 +16,7 @@ import { WalletIcon } from "../../assets/Icons/WalletIcon";
import { HubsIcon } from "../../assets/Icons/HubsIcon";
import { TradingIcon } from "../../assets/Icons/TradingIcon";
import { MessagingIcon } from "../../assets/Icons/MessagingIcon";
+import { executeEvent } from "../../utils/events";
const IconWrapper = ({ children, label, color }) => {
return (
@@ -185,7 +186,8 @@ export const MobileFooter = ({
/>
{
- await Browser.open({ url: 'https://www.qort.trade' });
+ executeEvent("addTab", { data: { service: 'APP', name: 'q-trade' } });
+ executeEvent("open-apps-mode", { });
}}
icon={