Skip to content

Commit

Permalink
fix(suite): ignore custom backend input error when default type is se…
Browse files Browse the repository at this point in the history
…lected
  • Loading branch information
komret committed Nov 28, 2024
1 parent ceb4484 commit 066e5f3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ export const CustomBackends = ({ network, onCancel }: CustomBackendsProps) => {
};

const { defaultUrls, isLoading } = useDefaultUrls(coin);
const editable = type !== 'default';
const { ref: inputRef, ...inputField } = register(name, { validate });
const isEditable = type !== 'default';
const isSubmitButtonDisabled = isEditable && !!error;

return (
<>
Expand Down Expand Up @@ -183,7 +184,7 @@ export const CustomBackends = ({ network, onCancel }: CustomBackendsProps) => {
<SaveButton
variant="primary"
onClick={onSaveClick}
isDisabled={!!error}
isDisabled={isSubmitButtonDisabled}
data-testid="@settings/advance/button/save"
>
<Translation id="TR_CONFIRM" />
Expand Down

0 comments on commit 066e5f3

Please sign in to comment.