-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
…equested params. Resolves issue 551.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -323,9 +323,11 @@ public Wallet.SendRequest getSendRequest() { | |
* @param memo is a message to include in the payment message sent to the merchant. | ||
*/ | ||
public @Nullable Protos.Payment getPayment(List<Transaction> txns, @Nullable Address refundAddr, @Nullable String memo) | ||
throws IOException { | ||
throws IOException, PaymentRequestException.InvalidNetwork { | ||
if (!paymentDetails.hasPaymentUrl()) | ||
return null; | ||
if (!txns.get(0).getParams().equals(params)) | ||
throw new PaymentRequestException.InvalidNetwork(params.getPaymentProtocolId()); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mikehearn
Author
Member
|
||
Protos.Payment.Builder payment = Protos.Payment.newBuilder(); | ||
if (paymentDetails.hasMerchantData()) | ||
payment.setMerchantData(paymentDetails.getMerchantData()); | ||
|
Is it possible to check this already in
parsePaymentRequest
? Or is this because there could be theoretically multipleWallet
instances connected to different networks, and you won't know before the user tries to send it?