Adds countryCode to AmazonGiftCardAccountPayload
Account upgrade done at startup => Eurozone accounts will prompt for country.
Trade buyer step 2 prompts use of the appropriate Amazon website for buying gift card.
Ensure the trade statistics list in TradesChartsView doesn't go stale
upon new stats arrivals, by moving a fillList() call from the currency
combobox onChangeConfirmed event handler to the selectedTradeStatistics
(TradesChartsViewModel field) listener.
Also avoid unnecessary use of an ObservableList as a temporary variable.
Add a nested class of lazy fields to (Deposit|Transactions)ListItem,
together with an associated memoised Supplier, lazyFieldsSupplier, which
initialises them all the first time any one of them is requested. Move
the txConfidenceIndicator & tooltip fields to this class, so that they
are only loaded when the given address/tx row is displayed in the
deposit/transactions views, respectively.
This prevents a minor bottleneck, as profiling indicates that creating a
tooltip for each tx confidence indicator in the list is quite expensive
and takes up around half the rendering time. (There may be 1000's of txs
or addresses in an old wallet.)
Fix a serious memory leak in DepositListItem due to missing removal of
the BalanceListener (one per item) from BtcWalletService. This prevented
GC of the entire list of items, which was observed to leak ~500 MB in
JProfiler after repeated switching (several dozen times) between tabs.
Attempt to remove a bottleneck during the transactions view load, as
revealed by JProfiler, by optimising the code to determine if any given
transaction and trade are related. Since both these sets will tend to
grow linearly with time, causing quadratic slowdown of TransactionsView,
try to alleviate (without completely fixing) the problem.
To do this, add a cached set of disputed trade IDs to DisputeListService
so that TransactionAwareTradable.is(Dispute|RefundPayout)Tx can be made
O(1) in the common case that the given trade is not involved in any
dispute. Also avoid calling Sha256Hash::toString by passing tx IDs as
Sha256Hash objects directly to is(Deposit|Payout)Tx, and short circuit
an expensive call BtcWalletService.getTransaction in isDelayedPayoutTx,
in the common case, by pre-checking the transaction locktime.
This also fixes a bug in isRefundPayoutTx whereby it incorrectly returns
false if there are >1 disputes in the list returned by RefundManager but
the given trade is not involved in the last one.