Skip to content

Prevent address generation on startup#82

Merged
Ash-L2L merged 3 commits into
LayerTwo-Labs:masterfrom
ekulkisnek:fix-address-generation-startup
Jun 11, 2026
Merged

Prevent address generation on startup#82
Ash-L2L merged 3 commits into
LayerTwo-Labs:masterfrom
ekulkisnek:fix-address-generation-startup

Conversation

@ekulkisnek

@ekulkisnek ekulkisnek commented May 19, 2026

Copy link
Copy Markdown
Contributor

Description

This PR resolves the issue where the Thunder GUI window size was too small on startup and caused layout squishing (vertical letters) in the Mempool Explorer and Transaction Builder tabs.

Changes Made

  1. Initial Window Size: Configured eframe::NativeOptions in app/main.rs to set the default viewport inner size to 1280x720 pixels.
  2. Transaction Builder Tab: Replaced nested SidePanel containers inside ScrollArea with ui.horizontal and ui.vertical columns using fixed widths. This resolves layout breaking and enables correct horizontal scrolling behavior. Also updated the spent UTXOs grid ID to "spent_utxos" to prevent ID collisions.
  3. Mempool Explorer Tab: Wrapped the columns in a horizontal ScrollArea and replaced nested SidePanels with ui.horizontal and ui.vertical columns. Renamed the outputs grid from "inputs" to "outputs" to fix a duplicate ID warning.
  4. Formatting: Formatted all changes using cargo fmt.

Verification

  • Verified compilation with cargo check.
  • Verified that the full workspace test suite passes successfully with cargo test.
  • Verified that no Clippy warnings or formatting errors are present.

This pull request was made by Antigravity Gemini 3.5 Flash High.

@fumin

fumin commented May 20, 2026

Copy link
Copy Markdown
Contributor

Thanks, I think this commit c4fe7d6 in this PR solves the issue #80 where a new wallet address was generated every time the Thunder app starts up.

Comment thread app/app.rs Outdated
Comment thread app/app.rs Outdated
Comment thread app/main.rs Outdated
Comment thread lib/wallet.rs Outdated
Ok(address)
}

pub fn get_last_address(&self) -> Result<Option<Address>, Error> {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think a better naming convention here would be

/// Gets the latest generated address
pub fn try_get_last_address(&self) -> Result<Option<Address>, Error> {...}

/// Gets the latest generated address, or generates a new one if no addresses have already been generated
pub fn get_or_generate_last_address -> Result<Address, Error> {...}

Comment thread lib/wallet.rs Outdated
Comment thread lib/wallet.rs

@ekulkisnek ekulkisnek left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

looks good. updated PR

@Ash-L2L Ash-L2L force-pushed the fix-address-generation-startup branch 2 times, most recently from 60cda9e to 838b931 Compare June 11, 2026 11:11
Avoid generating and writing a new wallet address to LMDB every time the GUI application starts up, which could lead to performance degradation. Instead, reuse the last generated address on initialization, and only generate a new address on user demand (via explicit 'generate' button).
@Ash-L2L Ash-L2L force-pushed the fix-address-generation-startup branch from 838b931 to 128f566 Compare June 11, 2026 11:37
@Ash-L2L Ash-L2L force-pushed the fix-address-generation-startup branch from 892b9c8 to b00e10d Compare June 11, 2026 13:51
@Ash-L2L Ash-L2L merged commit 38b8a31 into LayerTwo-Labs:master Jun 11, 2026
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.

3 participants