spesmilo / spesmilo/electrum

Allow both period and comma to be used as the decimal separator

Open
#8,633 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I use Electrum 4.4.6 on Windows 10 x64.

The feature I am asking about is to allow comma to be used to separate the integer part from the fractional part in the "Amount" field. Comma is used as the decimal separator in many countries and ISO 80000-1 also marks it as valid as well as the period sign.

The problem is that if you copy and paste the amount with the comma, it is simply ignored resulting in a higher value. For example if you copy and paste "0,012" to the "Amount" field, it will result in "0012", which means 12 BTC are to be transferred; this can lead to disastrous consequences.

So I think comma has to be allowed as the valid decimal separator in the "Amount" field to avoid these mistakes.

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 reproducing the paste behavior in Electrum's Amount field with 0,012 and the existing period format. Locate the input handling for that field and verify that both separators produce the intended fractional amount without changing other validation; done means comma and period inputs are handled safely.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
localization, payments
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.