Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.

Migration to Electrum#1

Merged
dpad85 merged 50 commits intomasterfrom
wip-elecapi
Nov 21, 2017
Merged

Migration to Electrum#1
dpad85 merged 50 commits intomasterfrom
wip-elecapi

Conversation

@sstone
Copy link
Member

@sstone sstone commented Oct 18, 2017

Migration to Electrum; improved fees management; added user preferences

  • Removed Bitcoinj dependency and all associated code

  • Backend wallet is now Electrum, through a new version of eclair-core

  • Communication between Eclair Wallet and Electrum works through the PaymentSupervisor actor

  • Moved targetSDK to 26 (sdk 27 can not be used until the following issue is fixed:https://issuetracker.google.com/issues/68454482)

  • Updated design of Open Channel and Send Payment modal windows

  • Improved error feedback when sending a payment and opening a channel

  • Fees estimations are periodically fetched by eclair-core and are now displayed in the payment form

  • Fast fees means that the tx should be included in the next 2 blocks (20min)

  • Medium fees means in the next 12 blocks (2h)

  • Slow fees in the next 72 blocks (12h)

  • Amounts in home (payments and balance) can now be displayed in fiat currency. Default value is USD. Rate value is fetched from the coindesk API.

  • Amounts in home are displayed in the user's preferred bitcoin unit (mBTC, BTC)

  • Added an optional PIN when sending a payment

  • User can now set preferences such as the preferred bitcoin unit (mBTC, BTC), the preferred fiat currency, requiring a PIN code when sending a payment...

  • Prefer balance calculated from payment DB when balance from wallet is 0. This prevents an issue at startup where electrum returns a zero balance because it is too slow to fetch the relevant data from the servers, even if eclair wallet knows from its DB that the balance may not be 0. In last resort we rely on the onchain txs recorded in the Eclair Wallet payment DB.

  • Disabling buttons when payment is processing instead of hiding them

  • removed early node's uri validation. Error is shown in the modal window to streamline the user experience

  • Ignoring tx confidence events where conf > 10

* if this boolean is true, Lightning payments should fail if the fee
  exceeds 1% of the amount of the payment.
* added comments in App.java
* removed occurrences of printstacktrace
* handling case where wallet does not retrieve onchain address on time
This prevents an issue at startup where electrum returns a zero balance
because it is too slow to fetch the relevant data from the servers, even
if eclair wallet knows from its DB that the balance may not be 0.

In last resort we rely on the onchain txs recorded in the Eclair Wallet
payment DB.

If the balance from the wallet is truly 0 and the balance from the payment DB
returns a wrong non zero balance, it can only be because Eclair Wallet was
not notified with the latest txs, and should be notified soon, in which
case the balance from the payment DB will be corrected.
* removed early node's uri validation. Error is shown in the modal window
  to streamline the user experience
* open channel modal should have the same look and feel than payment modal
* tx is added to DB as soon as btc onchain payment completes

* added null guards in PaymentListFragment
* Pulling the balance from the front end returns an inadequate balance
  when the app is starting because txs are not all pulled yet.

* Listening to the ElectrumWallet.Ready event gives the current balance.
  Also, the ready event is pushed when the wallet receives a new tx
  which makes it perfect for updating the balance.

* When the app starts, the balance is calculated from the existing
  payments in the DB. This value is overriden by the real balance in the
  wallet as soon as the wallet is ready.
…unit

* enabled preferred bitcoin unit preference

* preferred unit is now stored in the `btc_unit` field in default prefs

* payments amount is now formatted and displayed in the user's preferred unit
* payments list and its content is refreshed when user's preferred bitcoin
  unit or fiat currency is changed

* exchange rate is now stored as a static value in App
* User clicks on the balance view in home to display amounts in fiat
  currency or in bitcoin
* Change in this preferrence refreshes balance & payments list
* CoinAmountView components are not clickable anymore because the
  unit/currency change is centralized
@dpad85 dpad85 merged commit 7310576 into master Nov 21, 2017
@dpad85 dpad85 self-assigned this Nov 21, 2017
@dpad85 dpad85 changed the title [WIP] switch to elextrumx API Migration to Electrum Nov 21, 2017
@pm47 pm47 changed the title Migration to Electrum [WIP] switch to electrumx API Nov 21, 2017
@dpad85 dpad85 changed the title [WIP] switch to electrumx API Migration to Electrum Nov 21, 2017
@dpad85 dpad85 deleted the wip-elecapi branch November 21, 2017 18:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants