Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix select currency issues after edit offer #1578

Conversation

ripcurlx
Copy link
Contributor

Fixes #1565.

@ripcurlx ripcurlx requested a review from ManfredKarrer June 21, 2018 10:15
}

public void initWithData(OpenOffer openOffer) {
this.openOffer = openOffer;
this.initialState = openOffer.getState();
this.paymentAccount = user.getPaymentAccount(openOffer.getOffer().getMakerPaymentAccountId());
// select the current offer payment account as default payment account
preferences.setSelectedPaymentAccountForCreateOffer(paymentAccount);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that needed in the base class or should that be only called in the createOffer sub class? If so, maybe better to overwrite initWithData there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this is already the edit offer sub class. The naming of the method is misleading, I'll rename it to a generic one.

@@ -131,9 +131,9 @@ protected void deactivate() {
///////////////////////////////////////////////////////////////////////////////////////////

public void initWithData(OpenOffer openOffer) {
model.initWithData(openOffer);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer if we don't have that call before the super call. Carries risky dependencies of order of calls (see my comment in other commit - maybe that solves the issue without changing here the order?)

cbeams and others added 5 commits June 25, 2018 11:44
This does the work that was intended to be done in commit
175e11d, but was done by first removing
the dependencyVerification block entirely, and then replacing it with
the output of the `calculateChecksums` task.

The entire process went like this:

 1. Remove existing dependencyVerification block from build.gradle
 2. Run `./gradlew -q calculateChecksums | grep -v network.bisq:bisq- >> build.gradle`
 3. Run `git diff` to see that only the checksums we expect to have
    changed have in fact changed (libdohj and bitcoinj in this case).
 4. Commit the changes (in this commit)

I'll update the instructions for the dependencyVerification block in a
subsequent commit to make this clearer in the future.
- Use ProtobufferException for
CoreNetworkProtoResolver.fromProto(PB.NetworkEnvelope proto)
- Add raw PB data in case if an exception
- log error if the encrypted data contains unknown PB data

Note: We should refactor the resolvers with checked exceptions instead
of the ProtobufferRuntimeException, but for the moment we leave that to
not add too much complexity/risk for that release.
@ripcurlx
Copy link
Contributor Author

@ManfredKarrer: I think I somehow f** up this PR. I'll delete it an re-open a new one with a different strategy that makes it even easier to solve this issue 😄

@ripcurlx ripcurlx closed this Jun 25, 2018
@ripcurlx ripcurlx deleted the fix-selected-currency-issues-after-edit-offer branch September 5, 2018 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants