feat: updated transfer ui with a cleaner look#57
Open
ronnakamoto wants to merge 2 commits intoLayerTwo-Labs:masterfrom
Open
feat: updated transfer ui with a cleaner look#57ronnakamoto wants to merge 2 commits intoLayerTwo-Labs:masterfrom
ronnakamoto wants to merge 2 commits intoLayerTwo-Labs:masterfrom
Conversation
Ash-L2L
requested changes
May 19, 2025
| use eframe::egui::{self, Color32, Response, Ui}; | ||
|
|
||
| /// Layout dimensions | ||
| pub struct LayoutDimensions; |
Collaborator
There was a problem hiding this comment.
Why is this a struct? This could be a module
| } | ||
|
|
||
| /// Layout colors | ||
| pub struct LayoutColors; |
Collaborator
There was a problem hiding this comment.
Why is this a struct? This could be a module
| } | ||
|
|
||
| /// Helper functions for layout | ||
| pub struct LayoutHelpers; |
Collaborator
There was a problem hiding this comment.
Why is this a struct? This could be a module
| if !self.amount.is_empty() && amount.is_err() { | ||
| ui.add_space(LayoutDimensions::SMALL_SPACING); | ||
| ui.colored_label( | ||
| egui::Color32::from_rgb(255, 0, 0), |
Collaborator
There was a problem hiding this comment.
Colors should be defined as consts somewhere
| { | ||
| // Set a maximum length of 62 characters for Bitcoin addresses | ||
| // This covers all Bitcoin address formats (P2PKH, P2SH, Bech32, etc.) | ||
| if self.mainchain_address.len() > 62 { |
Collaborator
There was a problem hiding this comment.
the 62 should be defined as a const somewhere
| // Set a maximum length of 62 characters for Bitcoin addresses | ||
| // This covers all Bitcoin address formats (P2PKH, P2SH, Bech32, etc.) | ||
| if self.mainchain_address.len() > 62 { | ||
| self.mainchain_address.truncate(62); |
Collaborator
There was a problem hiding this comment.
Truncation seems like the wrong behavior here. If the address is too long to be parsed, then displaying a parse error is preferable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated the transfer UI to have a better look.