Closed chitowncrispy closed 5 years ago
Merging #293 into master will increase coverage by
0.15%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #293 +/- ##
==========================================
+ Coverage 11.25% 11.41% +0.15%
==========================================
Files 230 230
Lines 9096 9084 -12
==========================================
+ Hits 1024 1037 +13
+ Misses 8072 8047 -25
Impacted Files | Coverage Δ | |
---|---|---|
...ning/Services/DataUpdater/InvoiceListUpdater.swift | 35.71% <ø> (-14.29%) |
:arrow_down: |
Lightning/Services/LightningService.swift | 58.44% <100%> (+5.42%) |
:arrow_up: |
...htning/Services/Misc/BlockChainHeightUpdater.swift | 95.83% <0%> (+35.41%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update ba0939d...94bb9b0. Read the comment docs.
👌👌
Description
I was able to simplify the fix made in PR #285. We already had a signal firing when the "items" of the different "lists" were updated. Those lists included the transactions made on-chain as well as the invoices fulfilled on the Lightning Network. My changes here rip out all the changes I made in the previous PR and simply wrap the
self?.balanceService.update()
in theupdateBalanceOnChange<T>(of items: MutableObservableArray<T>)
method so that way the race condition can be satisfied and the call to update the balances happens at the correct time for all transactions be it on-chain or on the Lightning Network.Motivation and Context
I found an issue with the balance updating when sending an on-chain transaction while testing my changes for PR #285. The behavior was similar to the master branch at the time so I didn't look further into it at the time.
How Has This Been Tested?
While on testnet I ended up sending multiple on-chain transactions as well as created multiple invoices and fulfilled them from a 3rd party website. All of the transactions when submitted/completed showed the correct balance on the wallet page upon the proper state of the transaction.
Screenshots (if appropriate):
Types of changes
Checklist: