getSignerAddress
Returns the address of the signer connected to the SafeProvider
.
Usage
_14import { useSafe } from '@safe-global/safe-react-hooks'_14_14function SignerAddress() {_14 const { getSignerAddress } = useSafe()_14 const address = getSignerAddress()_14_14 return (_14 <>_14 {address ? address : 'No signer address'}_14 </>_14 )_14}_14_14export default SignerAddress
Parameters
UseAddressParams
Parameters to customize the hook behavior.
_10import { UseAddressParams } from '@safe-global/safe-react-hooks'
config
(Optional)
- Type:
SafeConfig
The configuration used instead of the one from the nearest SafeProvider
.
_10import { config } from './config.ts'_10_10const result = getSignerAddress({_10 config_10})
Returns
UseSignerAddressReturnType | undefined
The signer address.
_10import { UseSignerAddressReturnType } from '@safe-global/safe-react-hooks'