diff --git a/gun-eth/index.js b/gun-eth/index.js index bdcdcbf..63999ed 100644 --- a/gun-eth/index.js +++ b/gun-eth/index.js @@ -3,11 +3,6 @@ const SEA = require("gun/sea"); const ethers = require("ethers"); const SHINE = require("./SHINE.json"); -/* import Gun from "gun"; -import SEA from "gun/sea"; -import { ethers } from "ethers"; -import SHINE from "./SHINE.json"; */ - const SHINE_ABI = SHINE.abi; const SHINE_OPTIMISM_SEPOLIA = SHINE.address; @@ -25,7 +20,11 @@ Gun.chain.setToken = function (token) { return this; }; -ctx.on("put", function (msg) { +Gun.chain.getToken = function () { + return customToken; +}; + +Gun.on("put", function (msg) { const to = this.to; // Usa il token personalizzato msg.headers = { diff --git a/gun-eth/package.json b/gun-eth/package.json index e5e2e41..2fa9349 100644 --- a/gun-eth/package.json +++ b/gun-eth/package.json @@ -1,6 +1,6 @@ { "name": "gun-eth", - "version": "1.2.6", + "version": "1.2.7", "description": "A GunDB plugin for Ethereum, and Web3", "main": "index.js", "scripts": {