Skip to content

Conversation

@chedieck
Copy link
Collaborator

@chedieck chedieck commented Dec 7, 2024

Description

Fixes issue where an editable amount paybutton wouldn't allow for the user to finish the process of paying with another currency.

Test plan

After selecting an altcoin, the button "Send with XYZ" wouldn't appear in master. In this branch, it should appear normally.

Remarks

  • The change that makes it work is the empty <div></div> . I have no idea why is that so. Tried to figure out but decided not to spend too much time on that. My guess is something related to the new CSS, since this worked fine before.
  • It seems that the "Don't have any XEC?" text doesn't appear if a button is of fixed amount (i.e; not editable). I will check this out in a next PR.

labelId="select-coin-label"
className={classes.select_box}
value={selectedCoin?.coin}
value={selectedCoin?.coin ?? null}
Copy link
Collaborator Author

@chedieck chedieck Dec 7, 2024

Choose a reason for hiding this comment

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

this and the similar line below were put here to fixe console errors that would appear in the browser

@chedieck chedieck mentioned this pull request Dec 7, 2024
1 task
@Klakurka Klakurka self-requested a review December 8, 2024 00:58
Copy link
Member

@Klakurka Klakurka left a comment

Choose a reason for hiding this comment

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

Let's pop a code comment on that empty div as that's really weird...

@Klakurka
Copy link
Member

Klakurka commented Dec 8, 2024

@johnkuney any idea what's going on there?

@chedieck
Copy link
Collaborator Author

chedieck commented Dec 8, 2024

Let's pop a code comment on that empty div as that's really weird...

I had tried to do:
<div></div> {/* This is necessary for the button rendering */}

That made the sideshift logo and the input field HUGE. Some weird stuff happening indeed.

@johnkuney
Copy link
Collaborator

Thats so weird. How did you even figure that out?
I do not know what would be causing this. It doesnt appear to be CSS related afaict though, as the element is not even in the html without that blank div in there.

I did try moving the button up, above the {altpaymentEditable ? ( part just to see what it would do, and it rendered without a blank div, but then the editable field did not render ha

@chedieck chedieck force-pushed the fix/sideshift-finish-button branch from 1db7698 to a559761 Compare December 17, 2024 14:09
@chedieck
Copy link
Collaborator Author

I found the change that broke it and reverted to its previous state.

@johnkuney
Copy link
Collaborator

Cool, any idea why that broke it? just curious, why does it need to be a grid? and why would that effect a button outside the grid?

@chedieck
Copy link
Collaborator Author

chedieck commented Dec 17, 2024

Cool, any idea why that broke it? just curious, why does it need to be a grid? and why would that effect a button outside the grid?

I don't know it, really. Maybe it has to do with CSS in the widget, since the AltpaymentWidget is a child of it. Maybe it has to do with the way react renders stuff and hydrates the DOM in the client side. But truly, those are just guesses from my side.

@Klakurka Klakurka merged commit cd2767e into master Dec 18, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants