Skip to content

Commit

Permalink
Fixed Stroem Encoding of DisplayText
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberzac committed Jul 22, 2015
1 parent 78cb194 commit b68209f
Showing 1 changed file with 3 additions and 1 deletion.
@@ -1,5 +1,6 @@
package io.stroem.clientj;

import io.stroem.api.Messages;
import io.stroem.clientj.domain.*;
import io.stroem.promissorynote.PaymentInstrument;
import org.bitcoinj.core.*;
Expand Down Expand Up @@ -428,7 +429,8 @@ public synchronized StroemNegotiator incrementPayment(
ByteString infoByteString = ack.getInfo();
PaymentInstrument.PromissoryNote promissoryNote = JavaToScalaBridge.buildPromissoryNoteFromBytes(infoByteString);
ECPoint merchantPublicKey = returnBundle.getMerchantPublicKey();
PaymentInstrument.NegotiateInfo negotiateInfo = JavaToScalaBridge.validateForNegotiate(promissoryNote, myPublicKey, merchantPublicKey, returnBundle.getDisplayText().getBytes()); // Todo Should be encoded as PaymentInfo
final PaymentInstrument.PaymentInfo paymentInfo = Messages.displayTextToPaymentInfo(returnBundle.getDisplayText());
PaymentInstrument.NegotiateInfo negotiateInfo = JavaToScalaBridge.validateForNegotiate(promissoryNote, myPublicKey, merchantPublicKey, paymentInfo.bytes());

log.debug("6. End (return StroemNegotiator).");
return new StroemNegotiator(negotiateInfo);
Expand Down

0 comments on commit b68209f

Please sign in to comment.