added trade qortalrequests

This commit is contained in:
2024-11-10 07:57:37 +02:00
parent 40e8e316a8
commit 7a6a07c6e5
11 changed files with 570 additions and 162 deletions

View File

@@ -36,7 +36,7 @@ export const AppsDevModeHome = ({
availableQapps,
}) => {
const [domain, setDomain] = useState("");
const [domain, setDomain] = useState("127.0.0.1");
const [port, setPort] = useState("");
const { isShow, onCancel, onOk, show, message } = useModal();
const {

View File

@@ -183,7 +183,7 @@ const UIQortalRequests = [
'GET_WALLET_BALANCE', 'GET_USER_WALLET_INFO', 'GET_CROSSCHAIN_SERVER_INFO',
'GET_TX_ACTIVITY_SUMMARY', 'GET_FOREIGN_FEE', 'UPDATE_FOREIGN_FEE',
'GET_SERVER_CONNECTION_HISTORY', 'SET_CURRENT_FOREIGN_SERVER',
'ADD_FOREIGN_SERVER', 'REMOVE_FOREIGN_SERVER', 'GET_DAY_SUMMARY', 'CREATE_TRADE_BUY_ORDER', 'CREATE_TRADE_SELL_ORDER'
'ADD_FOREIGN_SERVER', 'REMOVE_FOREIGN_SERVER', 'GET_DAY_SUMMARY', 'CREATE_TRADE_BUY_ORDER', 'CREATE_TRADE_SELL_ORDER', 'CANCEL_TRADE_SELL_ORDER', 'IS_USING_GATEWAY'
];
@@ -437,7 +437,7 @@ isDOMContentLoaded: false
if (event?.data?.requestedHandler !== 'UI') return;
const sendMessageToRuntime = (message, eventPort) => {
window.sendMessage(message.action, message.payload, 60000, message.isExtension)
window.sendMessage(message.action, message.payload, 300000, message.isExtension)
.then((response) => {
if (response.error) {
eventPort.postMessage({

View File

@@ -83,9 +83,9 @@ export const Save = ({ isDesktop, disableWidth }) => {
.sendMessage(
"ENCRYPT_DATA",
{
payload: {
data64,
},
},
60000
)
@@ -101,6 +101,7 @@ export const Save = ({ isDesktop, disableWidth }) => {
console.error("Failed qortalRequest", error);
});
});
console.log('encryptData', encryptData)
if (encryptData && !encryptData?.error) {
const fee = await getFee("ARBITRARY");
@@ -138,6 +139,7 @@ export const Save = ({ isDesktop, disableWidth }) => {
}
}
} catch (error) {
console.log('errorsave', error)
setInfoSnack({
type: "error",
message: error?.message || "Unable to save to QDN",