Commit Graph

63 Commits

Author SHA1 Message Date
ThomasV 44b44279e7 import SSLError 2015-02-27 23:10:45 +01:00
ThomasV bc3013caf0 fix exchange_rate plugin behavior when typing amounts 2015-02-27 21:13:17 +01:00
ThomasV f302c90649 set self.wallet to None in plugin constructor 2015-02-17 11:39:06 +01:00
John Miguel Villar Zavatti ea4bf4e91f * Added BTCParalelo price index for Venezuelan Bolivar VEF
* Fixed all of the update_* functions on the exchange_rate.py plugin to indicate when there are SSL errors, there was a horrorous try-except-pass block that was drowning all the exceptions
* Added get_json_insecure to allow exchange rates over HTTP

Signed-off-by: John Miguel Villar Zavatti <johnvillarzavatti@gmail.com>
2015-02-16 15:24:26 -04:30
wozz 29cf811858 Fix currency type for bitcoinvenezuela history
update exchange rate history for bitcoinvenezuela exchange
2014-11-23 14:41:20 -05:00
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
ThomasV fd1f083958 simplify names 2014-09-19 13:48:49 +02:00
ThomasV 6cd00eb36b request history rates asynchronously 2014-09-19 13:36:30 +02:00
Michael Wozniak a996659225 Update itbit/coindesk exchange rate api
itbit/coindesk exchange rate requires separate API calls per currency
Moved the calls to when the exchange rate plugin updates and when the
user modifies a selection instead of every time the program needs to
query the current exchange rate

This fixes an issue with slow response time in the send tab with the
exchange rate plugin turned on and set to coindesk or itbit
2014-09-05 19:58:54 -04:00
ThomasV caf4adff49 add missing @hook in exch plugin 2014-09-05 19:43:27 +02:00
ThomasV 6101abda5d call init_qt everytime a plugin is enabled 2014-09-04 15:45:03 +02:00
ThomasV 79588eb4da init plugins before gui. register wallet types in plugin constructor 2014-08-31 15:33:20 +02:00
ThomasV a3790372d8 @hook decorator for plugins 2014-08-31 11:42:40 +02:00
Michael Wozniak 27ddfcdd36 Add itbit exchange to exchange rate plugin 2014-07-26 13:58:55 -04:00
Michael Wozniak 9ae30533ca update historical winkdex api 2014-07-22 17:28:37 -04:00
Michael Wozniak a72bc5a44a Update exchange rate plugin for Winkdex
updated exchange rate BTC price for Winkdex API that was officially published
2014-07-22 17:06:23 -04:00
ThomasV f4dfec4565 define frozen signal for exchange rate plugin 2014-06-24 17:44:31 +02:00
ThomasV f4a0a90010 catch exceptions raised by fiat amount conversion to decimal 2014-06-24 17:06:04 +02:00
ThomasV 96017fe530 fiat_e: set precision to 0.01 2014-06-11 18:20:25 +02:00
ThomasV cff3d6ce31 exchange rate plugin: bi-directional conversion 2014-06-11 18:10:21 +02:00
ThomasV efa35d9ec2 setAmount: convert to int 2014-06-11 15:36:40 +02:00
ThomasV d9d76436db replace fiat dialog with direct edit line 2014-06-11 15:32:09 +02:00
ThomasV 46c2de3979 separate AmountEdit and BTCAmountEdit classes, for exchange rate plugin 2014-06-11 14:44:26 +02:00
wozz fde8966471 Update historical exchange rate query
Update historical exchange rate query for bitcoinvenezuela to reduce extra data returned.
2014-04-28 11:03:32 -04:00
wozz 12b3a78036 Merge pull request #662 from wozz/issue-643
No longer require restart for toggle exchange rate
2014-04-22 14:42:32 -04:00
Michael Wozniak b2a80d8522 Exchange rate update
use exchange rate value instead of string to calculate balance
2014-04-19 09:03:11 -04:00
Michael Wozniak b7ea3c5e10 No longer require restart for toggle exchange rate
Fixes issue #643 and allows fiat button to work without restart

No logic is required because Send tab gets removed and added for every
toggle.
2014-04-17 12:48:16 -04:00
ThomasV a92aae3306 Merge pull request #639 from toomyem/spesmilo
Added Bitcurex and Bitmarket exchanges
2014-04-01 11:18:14 +02:00
Michael Wozniak b099930174 Update create current unix time
update method to create current unix time to be windows compatible

fix issue #640
2014-03-31 21:52:31 -04:00
Tomasz Machalski 0b8fc21db7 Added Bitcurex and Bitmarket exchanges 2014-03-31 21:02:21 +02:00
Michael Wozniak a3b88ca3dc Exchange Rate History - Add APIs
Add API for Winkdex and BitcoinVenezuela
2014-03-30 20:39:37 -04:00
Darrin Daigle 5619859386 Streamlined code - modified two procs (get_fiat_status_text and fiat_dialog) to call exchange API only once instead of twice (as recommended by wozz). 2014-03-27 22:00:23 -05:00
Darrin Daigle 9fb7fd5803 Cleaned up Exchange Rate plugin: more efficient code and more intuitive names for the get fiat balance/price procedures. Created new procedure used for updating the fiat balance & price on the status panel. Enhancement: status panel on bottom left now shows the current BTC price (eg, 1 BTC~573.45 USD). 2014-03-27 15:30:24 -05:00
Darrin Daigle eccb78c3e6 wrapped strings with _("string text") to enable language translation 2014-03-25 11:43:21 -05:00
Darrin Daigle dea58fcb49 fixed issue when exchange rate not available (eg, no connection) 2014-03-24 11:06:20 -05:00
Darrin Daigle 284bcc1e5b better handling of very small fiat numbers and mBTC 2014-03-23 23:17:20 -05:00
Darrin Daigle 7bfd170ad9 check if fiat button exists on send tab before updating its caption with the newly selected fiat currency 2014-03-23 13:33:54 -05:00
Darrin Daigle bc3bcc20dc check to see if fiat button already exists on send tab before telling user they must restart Electrum to see it 2014-03-23 12:58:42 -05:00
Darrin Daigle 669d8041e4 Add ability to specify fiat amount when sending bitcoin. 2014-03-22 23:04:06 -05:00
Michael Wozniak e6175c6f57 fix error with Decimal in older python versions 2014-03-17 22:03:48 -04:00
Michael Wozniak 2fc3f408c8 Exception caused by tx_list not defined
I wasn't seeing this before, so I assume it could be a race condition if
the "load_wallet" function doesn't finish before the history tab is updated.
2014-03-07 23:10:36 -05:00
Michael Wozniak f434bac45a fix bug for 0 transaction wallet
0 transaction wallet would return an error when getting transaction list
2014-03-07 22:51:58 -05:00
ThomasV 7f96001463 Merge pull request #609 from wozz/bitven
BitcoinVenezeula Rates
2014-03-06 09:44:53 +01:00
Michael Wozniak fbbf1970b6 BitcoinVenezeula Rates
Rates are taken from CoinDesk, modified for the true blackmarket rates,
not the "government approved" rates.
2014-03-05 17:13:34 -05:00
Michael Wozniak 05027c512e exchange rate bug fix 2014-03-05 16:03:56 -05:00
Michael Wozniak 723b0e430f non blocking exchange rate API calls
clear combo box while waiting
2014-03-05 02:24:20 -05:00
Michael Wozniak 0c59b4148d Add new exchange rate options
BitcoinAverage added as new exchange rate option.

Add BitPay as new exchange rate API

Winkdex added as option for exchange rate - USD only

Cleanup exchange rate plugin

cavirtex exchange rate added

BTCChina - exchange rate
2014-03-04 23:57:32 -05:00
Michael Wozniak 3a078f507c update for new transactions with exchange plugin
new transactions aren't already loaded to the wallet when the update is
run. this catches the exception and gets the transaction value
2014-03-02 22:18:26 -05:00
Michael Wozniak f9a52684e3 Add history fiat tx value for exchange plugin
Added coindesk BPI rate calculation for transaction values in history.

Coindesk currently only provides this functionality for USD, so it is
only available when the Coindesk and USD combination has been
selected.
2014-03-02 21:08:46 -05:00
Michael Wozniak c582194bdc Add Coinbase exchange rate option
Add Coinbase exchange rate option in exchange rate plugin
2014-03-02 15:34:38 -05:00