Skip to content

Commit

Permalink
fix: dapp staking error message handling
Browse files Browse the repository at this point in the history
  • Loading branch information
UrbanWill committed Oct 11, 2024
1 parent b31c494 commit b45eebd
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@ const AmountInput = (props: AmountInputProps) => {
trailingLabel={props.disabled ? '...' : props.availableToStake}
trailingIcon={props.assetSelector}
leadingSupportingText={
props.disabled || props.isLoading
props.disabled
? ''
: Maybe.of(props.error).mapOr(props.fiatAmount, x => <TextInput.ErrorLabel>{x}</TextInput.ErrorLabel>)
: Maybe.of(props.isLoading ? undefined : props.error).mapOr(props.fiatAmount, x => (
<TextInput.ErrorLabel>{x}</TextInput.ErrorLabel>
))
}
trailingSupportingText={
<Button
Expand Down

0 comments on commit b45eebd

Please sign in to comment.