gun-eth 1.2.5 → 1.2.6

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.
Files changed (2) hide show
  1. package/index.js +7 -12
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -25,18 +25,13 @@ Gun.chain.setToken = function (token) {
25
25
  return this;
26
26
  };
27
27
 
28
- Gun.on("opt", function (ctx) {
29
- if (ctx.once) {
30
- return;
31
- }
32
- ctx.on("out", function (msg) {
33
- var to = this.to;
34
- // Usa il token personalizzato
35
- msg.headers = {
36
- token: customToken,
37
- };
38
- to.next(msg); // passa al prossimo middleware
39
- });
28
+ ctx.on("put", function (msg) {
29
+ const to = this.to;
30
+ // Usa il token personalizzato
31
+ msg.headers = {
32
+ token: customToken,
33
+ };
34
+ to.next(msg); // passa al prossimo middleware
40
35
  });
41
36
 
42
37
  // Aggiungi il metodo alla catena di Gun
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gun-eth",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "A GunDB plugin for Ethereum, and Web3",
5
5
  "main": "index.js",
6
6
  "scripts": {