stack_wallet icon indicating copy to clipboard operation
stack_wallet copied to clipboard

Bug: Unable to insert decimal separator into amount fields (europe uses comma instead of dot)

Open tohrxyz opened this issue 1 year ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current Behavior

I'm european and my decimal separator is a comma , instead of dot . like you have in US, you separate thousands by comma, we just insert a space or nothing at all.

Stack wallet doesn't seem to support entering a comma , into amount fields when sending a transaction, because it thinks comma is for thousands separation, not a decimal separator.

So I literally CAN'T enter a fraction of eur or XMR like 0.024 XMR because it brings up numerical keyboard (on iOS) and there's only comma. I am hitting comma and it goes like 0,240.... which then gets converted to like 3000 EUR. The same goes for when I want to write fractional amount of fiat.

The only thing that worked for me was to copy . from somewhere else and paste it into the field.

Btw when generating a qr code for receiving, it too doesn't support , as decimal separator, but when I enter it there, it then says it's invalid amount. image image

Expected Behavior

It should recognize also comma , as a decimal separator. Because otherwise non-us users are unable to use it.

Reproduce Steps

  1. use iOS
  2. have region/language/number format set such, that it uses comma , as decimal separator
  3. start typing into number fields
  4. want to type decimal separator
  5. keyboard offers ,
  6. enter => doesn't work, thinks it's thousands

Environment

  • Operating system and version: iOS 17.1
  • Device platform and version: iPhone 11
  • Real device or emulator/simulator: real phone

Logs

No response

Further Information

No response

tohrxyz avatar Mar 27 '24 16:03 tohrxyz

Tested by setting my iphone region to germany and it seems to work fine there. It appears ios has relatively recently add the ability to change the number formatting regardless of region/locale which is likely causing your issue. At least that is the only way I was able to reproduce it.

The current dart/flutter libs that I know of do not support fetching this data from ios so further investigation is required. At least I haven't seen any that support all platforms that we support.

julian-CStack avatar Jul 08 '24 14:07 julian-CStack