hackchat-engine 1.1.26 → 1.1.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Client.js CHANGED
@@ -384,11 +384,25 @@ class Client extends EventEmitter {
384
384
  const requestDomain = domain
385
385
  || (typeof window !== 'undefined' && window.location ? window.location.host : 'hack.chat');
386
386
 
387
+ let locale = 'en';
388
+ try {
389
+ if (typeof navigator !== 'undefined' && navigator.language) {
390
+ locale = navigator.language;
391
+ } else if (typeof Intl !== 'undefined') {
392
+ locale = Intl.DateTimeFormat().resolvedOptions().locale;
393
+ }
394
+
395
+ locale = locale.split('-')[0].toLowerCase();
396
+ } catch (err) {
397
+ locale = 'en';
398
+ }
399
+
387
400
  this.ws.send({
388
401
  cmd: OPCodes.REQUEST_SIW,
389
402
  wallet,
390
403
  address,
391
404
  domain: requestDomain,
405
+ locale,
392
406
  });
393
407
  }
394
408
 
package/package.json CHANGED
@@ -59,5 +59,5 @@
59
59
  "lintfix": "eslint --fix --ignore-path .gitignore .",
60
60
  "test": "echo \"Error: no test specified\" && exit 1"
61
61
  },
62
- "version": "1.1.26"
62
+ "version": "1.1.28"
63
63
  }
@@ -21,12 +21,14 @@ class SignTransactionHandler extends AbstractHandler {
21
21
  * @param {string} payload.tx The base64 encoded transaction payload
22
22
  * @param {string} payload.type The transaction type
23
23
  * @param {string} payload.channel The channel which invoked the event
24
+ * @param {string} payload.imageUrl The URL of the mint image
24
25
  */
25
26
  client.emit(Events.SIGN_TRANSACTION, {
26
27
  tx: packet.tx,
27
28
  type: packet.type,
28
29
  channel: packet.channel,
29
30
  from: packet.from,
31
+ imageUrl: packet.imageUrl,
30
32
  });
31
33
 
32
34
  client.emit(Events.DEBUG, `[${Events.SIGN_TRANSACTION}]: signTransaction requested`);