diff --git a/plugins/plugins/core/qdn/browser/browser.src.js b/plugins/plugins/core/qdn/browser/browser.src.js index d3172925..60a01fdc 100644 --- a/plugins/plugins/core/qdn/browser/browser.src.js +++ b/plugins/plugins/core/qdn/browser/browser.src.js @@ -3365,10 +3365,11 @@ class WebBrowser extends LitElement { const signRequest = await showModalAndWait( actions.SIGN_TRANSACTION, { - text1: `${shouldProcess ? get("modals.mpchange65") : get("modals.mpchange6")}`, + text1: `${shouldProcess ? get("modals.mpchange65") : get("modals.mpchange66")}`, text2: get("modals.mpchange67"), text3: `${get("modals.mpchange68")} ${decodedData.type}`, - json: `${get("modals.mpchange69")} ${decodedData}` + txdata: `${get("modals.mpchange69")}`, + txjson: `${JSON.stringify(decodedData)}` } ) if (signRequest.action === 'accept') { @@ -3399,10 +3400,7 @@ class WebBrowser extends LitElement { const signedBytes = appendBuffer(arbitraryBytesBuffer, signature) const signedBytesToBase58 = Base58.encode(signedBytes) if(!shouldProcess) { - let myMsg1 = get("modals.mpchange70") - let myMsg2 = get("modals.mpchange71") + signedBytesToBase58 - await showSuccessAndWait("REQUEST_SUCCESS", { id1: myMsg1, id2: myMsg2 }) - response = '{"error": "Process transaction was not requested!"}' + response = signedBytesToBase58 break } try { @@ -5265,7 +5263,8 @@ async function showModalAndWait(type, data) {
${data.text1}
${data.text2}
${data.text3}
-Transaction: ${data.json}
+${data.txdata}
+${convertJson(data.txjson)}
` : ''} ${type === actions.CREATE_TRADE_BUY_ORDER ? ` @@ -5415,6 +5414,35 @@ async function showModalAndWait(type, data) { }) } +function convertJson(jsonStr) { + let regeStr = '' + let f = { + brace: 0 + } + + regeStr = jsonStr.replace(/({|}[,]*|[^{}:]+:[^{}:,]*[,{]*)/g, function (m, p1) { + const rtnFn = function() { + return '