spesmilo / spesmilo/electrum

[SwapServer] Swap naming is confusing on the swap server side

Open
#10,522 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

swaps 🔁
Dominant language
Python
Stars
8.6k
Forks
3.5k
Avg merge
2d 8h
Merged PRs (30d)
61

Description

Description

Output of swapserver_get_history command is confusing. It says "Forward swap XXX BTC" when in fact it was LN->BTC swap, but searching the term "forward swap", it rather seems that BTC->LN is called a "forwards swap" (for example https://bitcoin.stackexchange.com/questions/116682/trustless-lightning-to-bitcoin-swap). As a server manager, I expected to see "Reverse swap" when a user sent me sats via LN and my server sent BTC onchain to the user.

It seems the naming is the other way around when reporting by this command.

For the client (e.g. in Electrum GUI) the same swap operation is called "Reverse swap XXX BTC". I would expect this to be same on both ends - on the side of the client and on the side of the swap server.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the swapserver_get_history command and the code that formats its swap-direction labels. Compare its output with the corresponding wording in the Electrum GUI, then verify that the server and client consistently name LN-to-BTC and BTC-to-LN swaps.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.