Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

334
Views
No puedo obtener datos de la función Ethers.js signer.getAddress()

No puedo obtener el valor de la función signer.getAddress() en Ethers.js. Cuando trato de usar "alerta" o "console.log", está bien, pero quiero mostrarlo directamente en la página. Dice; "objeto Promesa".

Aquí está mi código:

 import "./App.css"; import { ethers } from "ethers"; function App() { const provider = new ethers.providers.Web3Provider(window.ethereum, "any"); const signer = provider.getSigner(); async function connectMetamask() { await provider.send("eth_requestAccounts", []); } async function myAddress() { await signer.getAddress(); } return ( <div className="general"> <div className="web3-loader"> <button className="button1" onClick={connectMetamask}> Connect Metamask </button> </div> <br></br> <div className="input-area"> <label>{"Your address is: " + myAddress()} </label> <br></br> <label>Recipient address:</label> <input type="text" placeholder="Receiver address" className="input2" ></input> <br></br> <label>Amount:</label> <input type="text" placeholder="Amount of ETH" className="input3" ></input> </div> </div> ); } export default App;

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!