React Hooks Reference
getSignerAddress

getSignerAddress

Returns the address of the signer connected to the SafeProvider.

Usage


_14
import { useSafe } from '@safe-global/safe-react-hooks'
_14
_14
function SignerAddress() {
_14
const { getSignerAddress } = useSafe()
_14
const address = getSignerAddress()
_14
_14
return (
_14
<>
_14
{address ? address : 'No signer address'}
_14
</>
_14
)
_14
}
_14
_14
export default SignerAddress

Parameters

UseAddressParams

Parameters to customize the hook behavior.


_10
import { UseAddressParams } from '@safe-global/safe-react-hooks'

config (Optional)

  • Type: SafeConfig

The configuration used instead of the one from the nearest SafeProvider.


_10
import { config } from './config.ts'
_10
_10
const result = getSignerAddress({
_10
config
_10
})

Returns

UseSignerAddressReturnType | undefined

The signer address.


_10
import { UseSignerAddressReturnType } from '@safe-global/safe-react-hooks'

Was this page helpful?