Skip to content

refactor: remove duplicate poll_for_swap_creation and use poll_for_swap_with_progress#146

Closed
Tet-9 wants to merge 3 commits into
entrius:testfrom
Tet-9:fix/137-remove-duplicate-poll-for-swap-creation
Closed

refactor: remove duplicate poll_for_swap_creation and use poll_for_swap_with_progress#146
Tet-9 wants to merge 3 commits into
entrius:testfrom
Tet-9:fix/137-remove-duplicate-poll-for-swap-creation

Conversation

@Tet-9
Copy link
Copy Markdown

@Tet-9 Tet-9 commented Apr 21, 2026

Fixes #137

Problem

poll_for_swap_creation in swap.py is a weaker duplicate of
poll_for_swap_with_progress. Both functions use the same polling
logic, but poll_for_swap_creation only shows a static spinner while
poll_for_swap_with_progress provides better feedback with a live
elapsed-time counter like 0:03 elapsed.

Fix

  • Replaced the poll_for_swap_creation call in post_tx.py with
    poll_for_swap_with_progress, passing the already-available
    state.from_chain
  • Deleted poll_for_swap_creation from swap.py

Changes

  • allways/cli/swap_commands/post_tx.py — use poll_for_swap_with_progress
  • allways/cli/swap_commands/swap.py — deleted poll_for_swap_creation

LandynDev and others added 3 commits March 25, 2026 21:24
…rius#3)

Previously fee_divisor minimum was 2 (allowing up to 50% fee on miner
collateral per swap). Now enforced at minimum 20 (max 5%) in both the
contract and CLI.
@anderdc anderdc added the refactor Restructures code without changing behavior label Apr 21, 2026
@anderdc
Copy link
Copy Markdown
Collaborator

anderdc commented Apr 21, 2026

Closing as duplicate of #138 (also closes #137). #138 is the better implementation — adds a message parameter to poll_for_swap_with_progress to preserve the original "Waiting for swap to appear on-chain..." UX text. This PR drops the message.

@anderdc anderdc closed this Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Restructures code without changing behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove duplicate poll_for_swap_creation and use poll_for_swap_with_progress

3 participants