mirror of
https://github.com/status-im/safe-react.git
synced 2025-02-02 21:03:28 +00:00
Fix: toInfo could be null (#2154)
* validate if txInfo is defined * set toInfo as optional
This commit is contained in:
parent
70983c6c01
commit
228ab703ff
@ -133,7 +133,7 @@ type BaseCustom = {
|
||||
dataSize: string
|
||||
value: string
|
||||
isCancellation: boolean
|
||||
toInfo: AddressInfo
|
||||
toInfo?: AddressInfo
|
||||
}
|
||||
|
||||
type Custom = BaseCustom & {
|
||||
|
@ -33,7 +33,7 @@ const DetailsWithTxInfo = ({ children, txData, txInfo }: DetailsWithTxInfoProps)
|
||||
let name
|
||||
let avatarUrl
|
||||
|
||||
if (isCustomTxInfo(txInfo)) {
|
||||
if (isCustomTxInfo(txInfo) && txInfo.toInfo) {
|
||||
name = txInfo.toInfo.name
|
||||
avatarUrl = txInfo.toInfo.logoUri
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user