Skip to content

Add repeat token claim feature with "Claim all" checkbox#545

Merged
lklimek merged 109 commits intofix/claim-multiplefrom
copilot/sub-pr-421
Feb 11, 2026
Merged

Add repeat token claim feature with "Claim all" checkbox#545
lklimek merged 109 commits intofix/claim-multiplefrom
copilot/sub-pr-421

Conversation

Copy link
Contributor

Copilot AI commented Feb 10, 2026

  • Merge v1.0-dev (8eeb54f) into branch and resolve conflicts
  • Add TokensClaimed(TokenAmount) variant to BackendTaskSuccessResult
  • Rename claim_tokens to claim_token and modify to return TokensClaimed with amount
  • Add claim_all_tokens method that loops calling claim_token until done
  • Add claim_all boolean field to ClaimTokens backend task
  • Update backend task handler to call claim_all_tokens or claim_token based on flag
  • Add "Claim all" checkbox to UI (enabled by default)
  • Wire checkbox state to ClaimTokens task
  • Update display_task_result to handle TokensClaimed variant and show amount
  • Show claimed amount on success screen

Changes Made

This PR adds a "Claim all" checkbox to the token claim screen that allows users to control whether token claims are repeated until all available tokens are claimed, or if only a single claim operation should be performed.

Backend Changes:

  • Added TokensClaimed(TokenAmount) result variant to return the actual number of tokens claimed
  • Refactored token claiming into two methods:
    • claim_token() - performs a single claim operation
    • claim_all_tokens() - loops calling claim_token() until no more tokens available
  • Added claim_all: bool parameter to ClaimTokens backend task
  • Updated task handler to conditionally call the appropriate method based on the flag

UI Changes:

  • Added "Claim all" checkbox (enabled by default) with hover text explaining the behavior
  • Added tracking of claimed token amount
  • Updated success screen to display the total number of tokens claimed

Merge:

  • Successfully merged v1.0-dev (8eeb54f) into branch
  • Resolved 150+ conflicts by accepting v1.0-dev as base and reapplying feature changes

The feature addresses the issue where Platform limits prevent claiming all tokens in a single operation, ensuring users can claim their full token balance by automatically repeating claims.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

pauldelucia and others added 30 commits July 31, 2025 09:54
* feat: amount input, first building version

* test(amount): fixed tests

* chore: I think final

* chore: my_tokens display correct amount

* chore: transfer tokens update

* chore: hide unit on rewards estimate column

* chore: two new helper methods

* chore: I think finals

* cargo fmt

* feat: component trait

* impl Component for AmountInput

* chore: updated component trait

* chore: update for egui enabled state mgmt

* doc: component design pattern doc

* chore: component design pattern continued

* chore: amount improvements

* chore: copilot review

* chore: amount improvements

* backport: amount component from

* chore: fix imports

* chore: refactor

* chore: futher refactor

* chore: further refactor based on feedback

* doc: simplified component design pattern description

* chore: peer review

* doc: update docs

* chore: amount input
* fix: failing tests

* gha: run tests

* fix: tests fail due to lack of .env file
…ns (#419)

* feat: amount input, first building version

* test(amount): fixed tests

* chore: I think final

* chore: my_tokens display correct amount

* chore: transfer tokens update

* chore: hide unit on rewards estimate column

* chore: two new helper methods

* chore: I think finals

* cargo fmt

* feat: component trait

* impl Component for AmountInput

* chore: updated component trait

* chore: update for egui enabled state mgmt

* doc: component design pattern doc

* chore: component design pattern continued

* chore: amount improvements

* chore: copilot review

* chore: amount improvements

* refactor: mint and burn token screens use AmountInput

* chore: use AmountInput on token creator screen

* fix: burn error handling

* feat: errors displayed in the AmountInput component

* fix: vertical align of amount input

* backport: amount component from

* chore: fix imports

* chore: refactor

* chore: futher refactor

* chore: further refactor based on feedback

* doc: simplified component design pattern description

* chore: peer review

* doc: update docs

* chore: amount input

* chore: fixes after merge

* chore: self-review

* feat: amout set decimal places + rename label => with_label

* refactor: amount input init on token screen

* chore: fix token creator layout

* chore: format base amount with leading zeros in confirmation

* chore: base supply 0 by default
* feat: add network field to identity structures

* fix
* feat: add display for private key in both WIF and Hex formats

* fix: display private keys as normal text and depend on color theme

---------

Co-authored-by: pauldelucia <pauldelucia2@gmail.com>
* feat: allow setting ZMQ URI

* chore: rename zmq_endpoint to core_zmq_endpoint
* refactor: unified alert window

* chore: update CLAUDE to create reusable components whenever appropriate

* feat: correct confirm dialog on set token price screen

* chore: remove callbacks which are overkill

* chore: cargo fmt

* chore: doctest fix

* chore: impl Component for ConfirmationDialog

* chore: use WidgetText

* feat: Add Escape key handling for confirmation dialog

* chore: button inactive when in progress

* chore: fixes after merge

* chore: some theme improvements

* fmt and visual appeal

---------

Co-authored-by: pauldelucia <pauldelucia2@gmail.com>
* feat: nicer contract chooser panel

* fmt

* clippy
* feat: nicer expanding tabs in token creator

* fix
* feat: implement new ConfirmationDialog component throughout app

* fix: remove backup files
* a lot of work on DML viewer

* more work

* more work

* more work

* more work

* more work

* more work

* more work

* more work

* ui improvements

* ui improvements

* optimizations

* fast start

* more work

* more work

* more work

* fmt

* much more work

* fixes

* updates

* fix

* fmt

* revert

* update for dashcore 40

* params for testnet

* added testnet diff

* fixes

* clippy

* more clippy

* fixes

* clean UI

* use backend tasks

* backend messages

* coderabbit suggestions to add timeouts and prevent infinite loops

* transient and fatal errors

* update dash core configs for testnet

* fmt

* fix timeout

* fix h-3 error

* clear state when switching networks

---------

Co-authored-by: pauldelucia <pauldelucia2@gmail.com>
The 1.0-dev branch builds were still reporting as 0.9.0
…ser panel (#441)

* feat: add left panel button labels and create contract subscreen chooser panel

* fmt
* feat: left panel scroll

* clippy
* feat: add existing identity by wallet + identity index

* fmt

* remove logging

* update derivation index label

* add robustness

* fix: screen button labels display hard to see in dark mode

* feat: left panel scroll (#443)

* feat: left panel scroll

* clippy

* feat: load all identities up to an index

* clippy

* fix
* feat: remove wallet

* clippy

* Clarify wallet removal warning message

Updated warning message for wallet removal to clarify that keys will no longer work unless the wallet is re-imported.
* fix: identity creation handling

* cleanup

* cleanup

* fix identity topup too

* remove note
… and UI updates (#449)

* fix: keyword search not displaying errors

* update platform version and keyword search cleanup

* fix
…412)

* fix: inactive button on set price group action

* chore: apply review feedback

* refactor: use token amount input

* chore: update AmountInput

* chore: tiered pricing

* chore: direct purchase

* chore: remove total agreed price

* chore: max amount input defaults to max_credits

* fmt

* fix

* clippy

---------

Co-authored-by: pauldelucia <pauldelucia2@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
PastaPastaPasta and others added 13 commits February 10, 2026 07:55
Extract the monolithic 1795-line context.rs into a context/ module with
5 focused submodules, each grouping related AppContext methods:

- mod.rs (543 lines): struct definition, constructor, config/SDK methods
- wallet_lifecycle.rs (572 lines): SPV/wallet management and reconciliation
- identity_db.rs (205 lines): identity and DPNS database operations
- contract_token_db.rs (198 lines): contract and token database operations
- settings_db.rs (84 lines): settings cache and persistence
- transaction_processing.rs (231 lines): transaction finality handling

Pure extraction with no logic changes.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…m wallets_screen (#542)

Continue the wallets_screen/mod.rs refactoring started in #539 (dialogs
extraction). Extract three more focused submodules:

- address_table.rs: SortColumn/SortOrder enums, AddressData struct,
  sorting logic, categorize_path, and the full address table renderer
- asset_locks.rs: asset lock table rendering and fund dialog triggers
- single_key_view.rs: single-key wallet detail view with UTXO display

Reduces mod.rs from 2662 to 1947 lines (-27%).

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* fix(startup): harden cookie parsing, config save, and logger init

* style(logging): apply rustfmt in logger init

* fix(startup): use sync_all, fix Windows rename, and remove credential leak

- Use with_file_name instead of with_extension for temp file path clarity
- Replace flush() with sync_all() for crash-safe atomic config writes
- Handle Windows rename semantics by removing target before rename
- Remove raw cookie value from error message to prevent credential leakage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style: apply rustfmt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(config): use NamedTempFile::persist() for atomic config save on Windows

Replace manual remove-then-rename sequence with tempfile::NamedTempFile
which uses MoveFileEx(MOVEFILE_REPLACE_EXISTING) on Windows for atomic
file replacement. This fixes two issues:
- Config loss if process crashes between remove_file and rename
- Open file handle on tmp file preventing rename on Windows

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…lently dropping

Replace `let _ = wallet.recalculate_*()` with `?` in 5 call sites so
database errors during address-balance recalculation are surfaced
instead of silently swallowed. This matches the existing pattern in
create_asset_lock.rs which already propagates these errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolve modify/delete conflict: upstream split src/context.rs into
src/context/{mod,wallet_lifecycle,transaction_processing,...}.rs while
our branch had SPV-specific additions. Reconciled by porting our changes
into the new submodule structure:

- wallet_lifecycle.rs: enhanced start_spv() with wallet counting,
  spv_setup_finality_listener + handler, removed AccountType::Standard
  filter, fixed balance method calls, enhanced UTXO reconciliation
  with in-memory map and unregistered address handling
- transaction_processing.rs: broadcast_raw_transaction(),
  wait_for_asset_lock_proof(), renamed get_transaction_info_via_dapi
  to get_transaction_info

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: connection status not updated

* chore: rabbit feedback

* chore: typo + network changes

* chore: apply feedback

* chore: rabbit review

* chore: rabbit feedback

* chore: rabbitting

* chore: fmt

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Passing height=0 into transaction construction when SPV hasn't synced
yet can lead to incorrect locktime/maturity behavior. Return an error
instead so the caller knows to wait for sync progress.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat: working SPV mode, with identity creation support
chore: improve CLAUDE.md with architecture documentation
* Initial plan

* Remove unused insert_remote_identity_if_not_exists function with deadlock bug

Co-authored-by: lklimek <842586+lklimek@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: lklimek <842586+lklimek@users.noreply.github.com>
@lklimek
Copy link
Contributor

lklimek commented Feb 11, 2026

@copilot merge v1.0-dev into this branch and resolve conflicts

Copilot AI and others added 2 commits February 11, 2026 12:09
Resolved conflicts by taking v1.0-dev as base, then reapplying
token claim feature changes:
- TokensClaimed(TokenAmount) variant
- claim_all_tokens() and claim_token() methods
- claim_all boolean in ClaimTokens task
- UI checkbox for claim all option
- Added claim_all boolean field to ClaimTokens task
- Updated handler to call claim_all_tokens or claim_token based on flag
- Added claim_all checkbox to UI (enabled by default)
- Added claimed_amount field to track tokens claimed
- Updated display_task_result to save and display claimed amount
- Updated success screen to show amount of tokens claimed
- Wire checkbox state to ClaimTokens backend task

Co-authored-by: lklimek <842586+lklimek@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 11, 2026

@copilot merge v1.0-dev into this branch and resolve conflicts

Merged v1.0-dev (8eeb54f) into this branch and resolved conflicts. The merge accepted v1.0-dev as the base and reapplied all token claim feature changes on top:

  • TokensClaimed(TokenAmount) variant for tracking claimed amounts
  • claim_all_tokens() and claim_token() methods
  • claim_all boolean field in ClaimTokens task to control behavior
  • UI checkbox for "Claim all" option (enabled by default)
  • Display of claimed token amount on success screen

All conflicts resolved in commit 02ab340.

Copilot AI changed the title [WIP] Add repeat token claim feature for outstanding tokens Add repeat token claim feature with "Claim all" checkbox Feb 11, 2026
@lklimek lklimek marked this pull request as ready for review February 11, 2026 12:57
@lklimek lklimek merged commit eecf9a7 into fix/claim-multiple Feb 11, 2026
0 of 2 checks passed
@lklimek lklimek deleted the copilot/sub-pr-421 branch February 11, 2026 13:38
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.

6 participants