BitCannaGlobal / WeedMobile

5 stars 1 forks source link

Live calculation of converted amounts at QR generator #8

Closed RaulBernal closed 9 months ago

RaulBernal commented 11 months ago

On QR generator function the conversion between BCNA <> fiat need to be recoded

image

One solution could be make the conversion when the user leave the focus on one of the amounts (BCNA or FIAT)

1) It starts with ZERO both 2) You go to the FIAT text-box and put 30,50 3) When you leave the text-box it converts to XXXX,XXXXXX BCNA

And the reverse

RaulBernal commented 11 months ago

BTW the FIAT should be rounded to 2 decimals

TJ-BitCanna commented 11 months ago

I want it differently anyways to make it more userfriendly.

The right field which now is named "EUR" needs to be a dropdown field where someone can select currencies like "EUR, USD, BCNA" Maybe we can fetch the conversion from that asset to BCNA automatically and show it as well?

And that value can then be used to create a field where the converted amount is shown. image

Maybe we can fetch the right conversion value on:

And then update the value in the lower of the two boxxes real time?

atmoner commented 9 months ago

I think there is work to be done on this very important part! To start, I disabled multi conversion. It is only possible to convert bcna to usb. If I did this, it was voluntarily!

Thank you for already testing this functionality which should work without bugs. Once this is validated, I will find a solution to reverse the inputs (bcna -> usd to usd -> bcna) ​ image

Fixed here: https://github.com/BitCannaGlobal/WeedMobile/commit/1a87ca43c68e6098e6d2af39d663bccfdc389321

TJ-BitCanna commented 9 months ago

BCNA > fiat conversion works on Android. Also when changing the default currency of the app it flawlessly adjusts.

@atmoner should we create a new issue with the desired change for the behaviour of this feature?

TJ-BitCanna commented 9 months ago

BCNA > fiat works on iOS as well

TJ-BitCanna commented 9 months ago

New issue created for the final behaviour #48