Skip to content

Commit

Permalink
Re-add verifyPki method to PaymentSession to avoid needless API churn.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehearn committed Apr 14, 2014
1 parent 81f62db commit 843fa63
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/**
* Copyright 2013 Google Inc.
* Copyright 2014 Andreas Schildbach
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down Expand Up @@ -65,8 +62,6 @@
* as a confirmation message that the payment is now "processing" or that an error occurred, and then broadcast the
* tx itself later if needed.</p>
*
* @author Kevin Greene
* @author Andreas Schildbach
* @see <a href="https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki">BIP 0070</a>
*/
public class PaymentSession {
Expand All @@ -79,9 +74,9 @@ public class PaymentSession {

/**
* Stores the calculated PKI verification data, or null if none is available.
* Only valid after the session is created with verifyPki set to true, or verifyPki() is manually called.
* Only valid after the session is created with the verifyPki parameter set to true.
*/
public final PkiVerificationData pkiVerificationData;
@Nullable public final PkiVerificationData pkiVerificationData;

/**
* Returns a future that will be notified with a PaymentSession object after it is fetched using the provided uri.
Expand Down Expand Up @@ -417,6 +412,11 @@ private void parsePaymentRequest(Protos.PaymentRequest request) throws PaymentRe
}
}

/** Returns the value of pkiVerificationData or null if it wasn't verified at construction time. */
@Nullable public PkiVerificationData verifyPki() {
return pkiVerificationData;
}

/** Gets the params as read from the PaymentRequest.network field: main is the default if missing. */
public NetworkParameters getNetworkParameters() {
return params;
Expand Down

0 comments on commit 843fa63

Please sign in to comment.