I have tried to use WalletTemplate sub-project inside bitcoinJ lib. I have tried p2pkh sends and they work fine. But then I tried to make P2WPKH payment but it failed with the following error message
org.bitcoinj.core.RejectedTransactionException: Reject: tx
539c7f25b14b20dfad1ad66923fa59bf7531cd1ebda967e8346793fa2464f5dc for
reason 'non-mandatory-script-verify-flag (Signature must be zero for
failed CHECK(MULTI)SIG operation)' (64)
This behavior doesn't exist before commit. So I'm not sure how to handle the changes introduced since this change. I have also create github issue to get more information but I haven't got any response yet. I have tried code outside of bitcoinj's walletTemplate in another project as follows:
NetworkParameters params = TestNet3Params.get();
Address destination = Address.fromString(params, strDest);
Coin value = Coin.parseCoin(strValue);
SendRequest request = SendRequest.to(destination, value);
SendResult result = wallet.sendCoins(request);
Any help would be appreciated. Thanks
Issue was solve on github via the latest commit 7c31dcb.