3c3d064cad6b71d1d51e380f59b515f660fe01e1
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.
Electrum - lightweight Bitcoin client Licence: GNU GPL v3 Author: Thomas Voegtlin Language: Python Homepage: https://electrum.org/ 1. GETTING STARTED ------------------ To run Electrum from this directory, just do: ./electrum If you install Electrum on your system, you can run it from any directory: sudo python setup.py install electrum To start Electrum from your web browser, see http://electrum.org/bitcoin_URIs.html 2. HOW OFFICIAL PACKAGES ARE CREATED ------------------------------------ python mki18n.py pyrcc4 icons.qrc -o gui/qt/icons_rc.py python setup.py sdist --format=zip,gztar On Mac OS X: # On port based installs sudo python setup-release.py py2app # On brew installs ARCHFLAGS="-arch i386 -arch x86_64" sudo python setup-release.py py2app --includes sip sudo hdiutil create -fs HFS+ -volname "Electrum" -srcfolder dist/Electrum.app dist/electrum-VERSION-macosx.dmg
Description
Languages
Python
89.1%
QML
8.4%
Shell
2%
Dockerfile
0.2%
Java
0.2%
Other
0.1%