Don't crach Teleport when dest have no balances (#6862)

This commit is contained in:
Jaco 2022-01-21 17:39:47 +01:00 committed by GitHub
parent 55031922c1
commit 4fcaa37d1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -168,15 +168,17 @@ function Teleport ({ onClose }: Props): React.ReactElement<Props> | null {
onChange={setAmount}
/>
{destApi
? (
<>
<InputBalance
defaultValue={destApi.consts.balances.existentialDeposit}
isDisabled
label={t<string>('destination existential deposit')}
/>
</>
)
? destApi.consts.balances
? (
<>
<InputBalance
defaultValue={destApi.consts.balances.existentialDeposit}
isDisabled
label={t<string>('destination existential deposit')}
/>
</>
)
: null
: (
<Spinner
label={t<string>('Retrieving destination chain fees')}