diff --git a/src/App.tsx b/src/App.tsx
index 61c5700..21e16f1 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -38,9 +38,10 @@ import Return from "./assets/svgs/Return.svg";
import WarningIcon from "@mui/icons-material/Warning";
import Success from "./assets/svgs/Success.svg";
import CloseIcon from "@mui/icons-material/Close";
-import "./utils/seedPhrase/RandomSentenceGenerator";
-import EngineeringIcon from "@mui/icons-material/Engineering";
-import AccountBalanceWalletIcon from "@mui/icons-material/AccountBalanceWallet";
+import './utils/seedPhrase/RandomSentenceGenerator';
+import EngineeringIcon from '@mui/icons-material/Engineering';
+import AccountBalanceWalletIcon from '@mui/icons-material/AccountBalanceWallet';
+import PriorityHighIcon from '@mui/icons-material/PriorityHigh';
import {
createAccount,
saveFileToDisk,
@@ -403,14 +404,13 @@ function App() {
const {
isUserBlocked,
addToBlockList,
- removeBlockFromList,
- getAllBlockedUsers,
- } = useBlockedAddresses();
- const [currentNode, setCurrentNode] = useState({
- url: "http://127.0.0.1:12391",
- });
- const [useLocalNode, setUseLocalNode] = useState(false);
-
+ removeBlockFromList, getAllBlockedUsers} = useBlockedAddresses()
+ const [currentNode, setCurrentNode] = useState({
+ url: "http://127.0.0.1:12391",
+ });
+ const [useLocalNode, setUseLocalNode] = useState(false);
+
+ const [confirmRequestRead, setConfirmRequestRead] = useState(false);
const [isSettingsOpen, setIsSettingsOpen] = useState(false);
const [showSeed, setShowSeed] = useState(false);
const [creationStep, setCreationStep] = useState(1);
@@ -784,6 +784,7 @@ function App() {
qortalRequestCheckbox1Ref.current =
message?.payload?.checkbox1?.value || false;
}
+ setConfirmRequestRead(false)
await showQortalRequestExtension(message?.payload);
if (qortalRequestCheckbox1Ref.current) {
@@ -2075,7 +2076,78 @@ function App() {
isRunningPublicNode,
}}
>
-
+ {!isMobile && renderProfile()}
+
+
+
+
+ )}
+ {isOpenSendQort && isMainWindow && (
+
+
+
+
+
+
+ {
+ setIsOpenSendQort(false);
+ setIsOpenSendQortSuccess(true);
+ }}
+ defaultPaymentTo={paymentTo}
+ />
+
+ )}
+
+ {isShowQortalRequest && !isMainWindow && (
+ <>
+
+
+
-
+ {messageQortalRequest?.text4}
+
+
+ )}
+
+ {messageQortalRequest?.html && (
+
+ )}
+
+
+
+ {messageQortalRequest?.highlightedText}
+
+
+ {messageQortalRequest?.fee && (
+ <>
+
+
+
+ {"Fee: "}
+ {messageQortalRequest?.fee}
+ {" QORT"}
+
+
+ >
+ )}
+ {messageQortalRequest?.checkbox1 && (
+
+ {
+ qortalRequestCheckbox1Ref.current = e.target.checked;
+ }}
+ edge="start"
+ tabIndex={-1}
+ disableRipple
+ defaultChecked={messageQortalRequest?.checkbox1?.value}
+ sx={{
+ "&.Mui-checked": {
+ color: "white", // Customize the color when checked
+ },
+ "& .MuiSvgIcon-root": {
+ color: "white",
+ },
+ }}
+ />
+
+
+ {messageQortalRequest?.checkbox1?.label}
+
+
+ )}
+
+
+
+ onOkQortalRequest("accepted")}
+ >
+ accept
+
+ onCancelQortalRequest()}
+ >
+ decline
+
+
+ {sendPaymentError}
+ >
+ )}
+ {extState === "web-app-request-buy-order" && !isMainWindow && (
+ <>
+
+
+
+ The Application
{" "}
+ {requestBuyOrder?.hostname}
+
+ is requesting {requestBuyOrder?.crosschainAtInfo?.length}{" "}
+ {`buy order${
+ requestBuyOrder?.crosschainAtInfo.length === 1 ? "" : "s"
+ }`}
+
+
+
+
+ {requestBuyOrder?.crosschainAtInfo?.reduce((latest, cur) => {
+ return latest + +cur?.qortAmount;
+ }, 0)}{" "}
+ QORT
+
+
+
+ FOR
+
+
+
+ {roundUpToDecimals(
+ requestBuyOrder?.crosschainAtInfo?.reduce((latest, cur) => {
+ return latest + +cur?.expectedForeignAmount;
+ }, 0)
+ )}
+ {` ${requestBuyOrder?.crosschainAtInfo?.[0]?.foreignBlockchain}`}
+
+ {/*
+
+
+ Confirm Wallet Password
+
+
+ setPaymentPassword(e.target.value)}
+ /> */}
+
+
+ confirmBuyOrder(false)}
+ >
+ accept
+
+ confirmBuyOrder(true)}
+ >
+ decline
+
+
+ {sendPaymentError}
+ >
+ )}
+
+ {extState === "web-app-request-payment" && !isMainWindow && (
+ <>
+
+
+
+ The Application
{" "}
+ {sendqortState?.hostname}
+ is requesting a payment
+
+
+
+ {sendqortState?.description}
+
+
+
+ {sendqortState?.amount} QORT
+
+ {/*
+
+
+ Confirm Wallet Password
+
+
+ setPaymentPassword(e.target.value)}
+ /> */}
+
+
+ confirmPayment(false)}
+ >
+ accept
+
+ confirmPayment(true)}
+ >
+ decline
+
+
+ {sendPaymentError}
+ >
+ )}
+ {extState === "web-app-request-connection" && !isMainWindow && (
+ <>
+
+
+

+
+
+
+ The Application
{" "}
+ {requestConnection?.hostname}
+ is requestion a connection
+
+
+
+
+ responseToConnectionRequest(
+ true,
+ requestConnection?.hostname,
+ requestConnection.interactionId
+ )
+ }
+ >
+ accept
+
+
+ responseToConnectionRequest(
+ false,
+ requestConnection?.hostname,
+ requestConnection.interactionId
+ )
+ }
+ >
+ decline
+
+
+ >
+ )}
+ {extState === "web-app-request-authentication" && !isMainWindow && (
+ <>
+
+
+

+
+
+
+ The Application
{" "}
+ {requestConnection?.hostname}
+ requests authentication
+
+
+
+
+
+
+ Authenticate
+
+
+ {
+ setExtstate("create-wallet");
+ }}
+ >
+ Create account
+
+ >
+ )}
+ {extState === "wallets" && (
+ <>
+
+
+
{
+ setRawWallet(null);
+ setExtstate("not-authenticated");
+ logoutFunc();
+ }}
+ src={Return}
+ />
+
+
+
+ >
+ )}
+ {rawWallet && extState === "wallet-dropped" && (
+ <>
+
+
+
{
+ setRawWallet(null);
+ setExtstate("wallets");
+ logoutFunc();
+ }}
+ src={Return}
+ />
+
+
+
+

+
+
+
+ {rawWallet?.name ? rawWallet?.name : rawWallet?.address0}
+
+
+ Authenticate
+
+
+
+
+ <>
+
+ Wallet Password
+
+
+ setAuthenticatePassword(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === "Enter") {
+ authenticateWallet();
+ }
+ }}
+ ref={passwordRef}
+ />
+ {useLocalNode ? (
+ <>
+
+
+ {"Using node: "} {currentNode?.url}
+
+ >
+ ) : (
+ <>
+
+
+ {"Using public node"}
+
+ >
+ )}
+
+
+
+ Authenticate
+
+ {walletToBeDecryptedError}
+ >
+ >
+ )}
+ {extState === "download-wallet" && (
+ <>
+
+
+
+
+
+
+

+
+
+
+
+ Download Account
+
+
+
+ {!walletToBeDownloaded && (
+ <>
+
+ Confirm Wallet Password
+
+
+
+ setWalletToBeDownloadedPassword(e.target.value)
+
+ }
+ />
+
+
+ Confirm password
+
+ {walletToBeDownloadedError}
+ >
+ )}
+
+ {walletToBeDownloaded && (
+ <>
+ {
+ await saveFileToDiskFunc();
+ await showInfo({
+ message: `Keep your account file secure.`,
+ });
+ }}
+ >
+ Download account
+
+ >
+ )}
+ >
+ )}
+ {extState === "create-wallet" && (
+ <>
+ {!walletToBeDownloaded && (
+ <>
+
+
+
{
+ if(creationStep === 2){
+ setCreationStep(1)
+ return
+ }
+ setExtstate("not-authenticated");
+ setShowSeed(false)
+ setCreationStep(1)
+ setWalletToBeDownloadedPasswordConfirm('')
+ setWalletToBeDownloadedPassword('')
+ }}
+ src={Return}
+ />
+
+
+
)}
- {isShowQortalRequest && !isMainWindow && (
- <>
-
+
+ Create Account
+
+
+
{walletToBeDownloadedError}
+ >
+ )}
+
+ {walletToBeDownloaded && (
+ <>
+
+

+
+
+ Congrats, you’re all set up!
+
+
+
+
+ Save your account in a place where you will remember it!
+
+
+
{
+ await saveFileToDiskFunc();
+ returnToMain();
+ await showInfo({
+ message: `Keep your wallet file secure.`,
+ });
+ }}
+ >
+ Backup Account
+
+ >
+ )}
+ >
+ )}
+ {isOpenSendQortSuccess && (
+
+
+
+
+
+ The transfer was succesful!
+
+
+ {
+ returnToMain();
+ }}
+ >
+ Continue
+
+
+ )}
+ {extState === "transfer-success-request" && (
+ <>
+
+

+
+
+ The transfer was succesful!
+
+
+
{
+ window.close();
+ }}
+ >
+ Continue
+
+ >
+ )}
+ {extState === "buy-order-submitted" && (
+ <>
+
+

+
+
+ Your buy order was submitted
+
+
+
{
+ window.close();
+ }}
+ >
+ Close
+
+ >
+ )}
+ {countdown && (
+
+ {/* */}
+ {
+ window.close();
+ }}
+ size={75}
+ strokeWidth={8}
+ >
+ {({ remainingTime }) => {remainingTime}}
+
+
+ )}
+ {isLoading &&
}
+ {isShow && (
+
+ )}
+ {isShowInfo && (
+
+ )}
+ {isShowUnsavedChanges && (
+
+ )}
+ {isShowQortalRequestExtension && isMainWindow && (
+