-WIP-electrum-btcp/plugins
Gergely Imreh 3c3d064cad Fix "Invalid Fee" issue when start with fiat in send (exchange rate plugin)
Problem:

Using the exchange rate plugin in the send dialog one can start with
entering a fiat amount, e.g. 5 USD, and the BTC amount is updated,
but no fee is calculated.

In this case can get "Invalid fee" error until the BTC amount is
touched manually and fee is calculated. This can cause confusion
when "set transaction fees manually" is disabled.

Reproducing:

* enable exchange rate plugin
* start Electrum
* in send dialog fill out any receive address
* add a value (e.g. 5) into the fiat dialog and see the BTC value filled out
* fee is not filled out, or if disabled the manual transaction fees then directly
  get "Invalid Fee" error

Expectation:

* Fees are calculated just as it would be by filling out the BTC field

Fix:

Fixed by triggering a fee setting the same way as it is done when
the BTC field is edited, by calling `textEdited.emit("")` of the relevant
`BTCAmountEdit` element. One problematic  thing is that this also triggers
a change on the fiat we just edited, and thus cursor positions need to be saved
and restored. This is not ideal, there should be a way to avoid such cascades
and trigger fee calculation directly instead of by proxy.

Editing the fiat field with these changes is more or less okay, there can be
some strange steps when the decimal point is edited, but IMHO not worse
than the BTC field when the decimal point is edited there.
2014-09-30 11:28:42 +08:00
..
__init__.py header for plugins 2013-03-02 16:31:28 +01:00
btchipwallet.py Merge pull request #858 from btchip/labelfix 2014-09-21 19:23:34 +02:00
coinbase_buyback.py init plugins before gui. register wallet types in plugin constructor 2014-08-31 15:33:20 +02:00
cosigner_pool.py cosigner: add popup window 2014-09-14 20:28:21 +02:00
exchange_rate.py Fix "Invalid Fee" issue when start with fiat in send (exchange rate plugin) 2014-09-30 11:28:42 +08:00
greenaddress_instant.py don't duplicate code 2014-09-04 13:08:56 +02:00
labels.py Make all LabelSync calls async. 2014-09-11 13:08:35 +02:00
trezor.py Merge branch 'master' of git://github.com/spesmilo/electrum 2014-09-14 11:48:42 +02:00
virtualkeyboard.py init plugins before gui. register wallet types in plugin constructor 2014-08-31 15:33:20 +02:00