Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom backends form fix #15629

Merged
merged 1 commit into from
Nov 28, 2024
Merged

Custom backends form fix #15629

merged 1 commit into from
Nov 28, 2024

Conversation

komret
Copy link
Contributor

@komret komret commented Nov 28, 2024

Description

Fixes an obscure bug when form button was disabled for no reason.

Related Issue

Resolve

Screenshots:

before:

Screen.Recording.2024-11-28.at.15.03.39.mov

after:

Screen.Recording.2024-11-28.at.15.01.55.mov

@komret komret added bug Something isn't working as expected settings Settings page labels Nov 28, 2024
@@ -107,6 +107,7 @@ export const CustomBackends = ({ network, onCancel }: CustomBackendsProps) => {
const { defaultUrls, isLoading } = useDefaultUrls(coin);
const editable = type !== 'default';
const { ref: inputRef, ...inputField } = register(name, { validate });
const isSubmitButtonDisabled = type !== 'default' && !!error;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: could use editable for consistency, because editable is also used for conditions to display the inputs below.

Suggested change
const isSubmitButtonDisabled = type !== 'default' && !!error;
const isSubmitButtonDisabled = editable && !!error;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, done

@komret komret force-pushed the fix/custom-backends-submit branch from 5de7878 to 066e5f3 Compare November 28, 2024 14:44
@komret komret enabled auto-merge (rebase) November 28, 2024 14:48
@komret komret force-pushed the fix/custom-backends-submit branch from 066e5f3 to c239ee0 Compare November 28, 2024 14:51
@komret komret merged commit 528f58f into develop Nov 28, 2024
20 of 21 checks passed
@komret komret deleted the fix/custom-backends-submit branch November 28, 2024 15:06
@STew790
Copy link
Contributor

STew790 commented Nov 29, 2024

QA OK
Works as intended 🎉

Info:

  • Suite version: web 24.12.0 (8869ea9)
  • Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
  • OS: Linux x86_64
  • Screen: 1920x1080
  • Device: Trezor T3T1 2.8.5 regular (revision a61e783448043760a7c925e017bd08a4673a61c8)
  • Transport: BridgeTransport 2.0.33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected settings Settings page
Projects
Status: ✅ Approved
Development

Successfully merging this pull request may close these issues.

4 participants