const { $, showFlash } = require("./helpers"); const { state } = require("../../shared/state"); function init(ctx) { $("btn-receive-copy").addEventListener("click", () => { const addr = $("receive-address").textContent; if (addr) { navigator.clipboard.writeText(addr); showFlash("Copied!"); } }); $("btn-receive-back").addEventListener("click", () => { if (state.selectedToken) { ctx.showAddressToken(); } else { ctx.showAddressDetail(); } }); } module.exports = { init };