Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
bithalo committed Jul 17, 2024
1 parent f46c282 commit 6257823
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5502,7 +5502,7 @@ <h3></h3>
if(myaccounts == offerData2.recipient && offerData2.status[1] == 0) {
mode = 2;
}
var mslen = parseInt(DOMPurify.sanitize(await DDEcontract.methods.getMessageLength(counterpartyAddress2).call()));
var mslen = parseInt(DOMPurify.sanitize(await DDEcontract.methods.getMessageLength(offerHash2, counterpartyAddress2).call()));
var msIndex = localStorage.getItem(myaccounts + DDEaddy + offerHash2 + counterpartyAddress2 + 'lastMessageIndex') || 0;
if(mslen > msIndex) {
offerData2.newMessage = true;
Expand Down Expand Up @@ -5724,7 +5724,7 @@ <h3></h3>
myhash = web3.utils.keccak256(inputString);
offerData3.index = i;
if(offerHash3 in notifications) {
var mslen2 = parseInt(DOMPurify.sanitize(await DDEcontract.methods.getMessageLength(counterpartyAddress3).call()));
var mslen2 = parseInt(DOMPurify.sanitize(await DDEcontract.methods.getMessageLength(offerHash3, counterpartyAddress3).call()));
var msIndex2 = localStorage.getItem(myaccounts + DDEaddy + offerHash3 + counterpartyAddress3 + 'lastMessageIndex') || 0;
if(mslen2 > msIndex2) {
offerData3.newMessage = true;
Expand Down Expand Up @@ -7551,7 +7551,7 @@ <h6>${notification.message[0] || "Default Title"}</h6>
}
setActionActive(myaccounts+"sendMessage"+finalMessage, true);
showLoader();
var mslen = parseInt(DOMPurify.sanitize(await DDEcontract.methods.getMessageLength(listingSender).call())) + 1;
var mslen = parseInt(DOMPurify.sanitize(await DDEcontract.methods.getMessageLength(hash, listingSender).call())) + 1;
const sendResult = await DDEcontract.methods.sendMessage(hash, listingSender, finalMessage).send({ from: myaccounts });
if (sendResult) {
const newMessage = {
Expand Down Expand Up @@ -7659,7 +7659,7 @@ <h6>${notification.message[0] || "Default Title"}</h6>
let unreadMessageCount = 0;

try {
var mslen = parseInt(DOMPurify.sanitize(await DDEcontract.methods.getMessageLength(user).call()));
var mslen = parseInt(DOMPurify.sanitize(await DDEcontract.methods.getMessageLength(hash, user).call()));
while (index < mslen) {
const message = DOMPurify.sanitize(await DDEcontract.methods.messages(hash, user, index).call());
if (!message) break;
Expand Down

0 comments on commit 6257823

Please sign in to comment.