Skip to content

Get the address of the connected wallet as a string. #2707

Answered by zemse
andreitoma8 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @andreitoma8, signer.getAddress() returns a Promise object. In order to see the resolved value you can use ES8 await syntax or ES6 dot then syntax.

await signer.getAddress()

// or

signer.getAddress().then((addr) => {
    console.log(addr)
})

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@andreitoma8
Comment options

Answer selected by andreitoma8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants