Marketplace message are not working

Seller message for delivered goods to buyer is not working

When seller sends message on the delivery of digital goods, the buyer can't decrypt it

I've just tried and it seems to be working fine.

Are you getting any specific error? On your screen capture you highlight the shared key field but when entering the passphrase or private key on the first field you don't need to enter any shared key.

Which nxt version are you starting from?

I am working with @VCPVCP and we are starting from the nxt-starter version 1.12.2

I checked and when you are pressing decrypt there is not any call to the API, and not any error in the console.

After investigating it looks like it has to call the getDGSPurchase API (and when I do it with the API I receive the decrypted result).

Also I don't see anywhere in the Javascript code decryptedGoods being used, I guess it's used differently, if so could you tell me where so I could check what is not happening correctly?

Do you have a public node that we can check?

No need for public node - we reproduced it

Here's the public node

Here's a fix if you are in a hurry:

Index: html/www/js/nrs.encryption.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
diff --git a/html/www/js/nrs.encryption.js b/html/www/js/nrs.encryption.js
--- a/html/www/js/nrs.encryption.js	(revision 1f16a07ee6dbc54b94952e189cee1796634574c5)
+++ b/html/www/js/nrs.encryption.js	(revision d7564730a626f3a98fd09f381a24b018e1fa4891)
@@ -474,8 +474,8 @@
 			var encrypted = "";
 			var nonce = "";
 			var nonceField = (typeof title != "string" ? title.nonce : key + "Nonce");
-			if (key == "encryptedMessage" || key == "encryptToSelfMessage") {
-                var otherAccount = _encryptedNote.account;
+			var otherAccount = _encryptedNote.account;
+			if (key == "encryptedMessage" || key == "encryptToSelfMessage") {
 			    if (key == "encryptToSelfMessage") {
 					otherAccount = accountId;
1 Like

It works, @petko.petkov well done! Thanks a lot.