gun-eth 1.2.6 → 1.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +5 -6
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -3,11 +3,6 @@ const SEA = require("gun/sea");
3
3
  const ethers = require("ethers");
4
4
  const SHINE = require("./SHINE.json");
5
5
 
6
- /* import Gun from "gun";
7
- import SEA from "gun/sea";
8
- import { ethers } from "ethers";
9
- import SHINE from "./SHINE.json"; */
10
-
11
6
  const SHINE_ABI = SHINE.abi;
12
7
  const SHINE_OPTIMISM_SEPOLIA = SHINE.address;
13
8
 
@@ -25,7 +20,11 @@ Gun.chain.setToken = function (token) {
25
20
  return this;
26
21
  };
27
22
 
28
- ctx.on("put", function (msg) {
23
+ Gun.chain.getToken = function () {
24
+ return customToken;
25
+ };
26
+
27
+ Gun.on("put", function (msg) {
29
28
  const to = this.to;
30
29
  // Usa il token personalizzato
31
30
  msg.headers = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gun-eth",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "A GunDB plugin for Ethereum, and Web3",
5
5
  "main": "index.js",
6
6
  "scripts": {