[bisq-network/bisq] Fix payment account deserialize issue (e.g. CHASE_QUICK_PAY) (#5614)

jmacxx notifications at github.com
Sat Jul 10 17:29:27 CEST 2021

Fixes #5613

When loading payment accounts which have been deprecated, an exception is thrown which is not handled.  This causes the entire set of payment accounts to be lost.

To fix this we check for an exception when deserializing a payment account, and log a warning with the details.  The erroneous payment account will therefore be dropped from the list, which is what is expected.

I tested using the following procedure on both regtest & mainnet Bisq.

### Testing:

- Create a new Bisq account using v1.6.5 (or earlier).
- Add Amazon Giftcard and Chase QuickPay accounts for the user.
- Close Bisq, log in again using the same version and check that both accounts are listed.
- Close Bisq, upgrade to (v1.7.0 + this PR) and run it.
- Check that the Chase QuickPay account is no longer in the list, but the Amazon Giftcard account is present.

Check that a log warning is written, like this: 

    Jul-10 10:12:05.316 [PersistenceManager-read-UserPayload] WARN  b.core.payment.PaymentAccount: Could not load account: CHASE_QUICK_PAY, exception: java.lang.RuntimeException: Not supported PaymentMethod: PaymentMethod(id=N/A, maxTradePeriod=0, maxTradeLimit=0)

(It will actually be logged 2 times since UserPreferences deserializes 2 times).


You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * fix payment account deserialize issue (e.g. CHASE_QUICK_PAY)

-- File Changes --

    M core/src/main/java/bisq/core/payment/PaymentAccount.java (29)
    M core/src/main/java/bisq/core/user/UserPayload.java (1)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210710/d5dbf88f/attachment.htm>

More information about the bisq-github mailing list