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 send non bsq funds #4632

Merged
merged 1 commit into from Oct 13, 2020

Conversation

oscarguindzberg
Copy link
Contributor

@oscarguindzberg oscarguindzberg commented Oct 12, 2020

Fixes a bug sending non-BSQ funds from the BSQ wallet: If the destination address is segwit, an exception is thrown:

org.bitcoinj.core.AddressFormatException$InvalidCharacter: Invalid character '0' at position 17
at org.bitcoinj.core.Base58.decode(Base58.java:132)
at org.bitcoinj.core.Base58.decodeChecked(Base58.java:171)
at org.bitcoinj.core.LegacyAddress.fromBase58(LegacyAddress.java:146)
at bisq.core.btc.wallet.BsqWalletService.getPreparedSendTx(BsqWalletService.java:534)
at bisq.core.btc.wallet.BsqWalletService.getPreparedSendBtcTx(BsqWalletService.java:525)
at bisq.desktop.main.dao.wallet.send.BsqSendView.lambda$addSendBtcGroup$6(BsqSendView.java:300)

Copy link
Contributor

@chimp1984 chimp1984 left a comment

Choose a reason for hiding this comment

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

utACK

@chimp1984
Copy link
Contributor

Actually I think it would be more safe if we only do that for the getPreparedSendBtcTx method.
Now we call getPreparedSendTx from there but we could add a param to signal if segwit is permitted for outputs or not. that way we would ensure that for sending bsq it would fail when receiver address is segwit.

@ripcurlx
Copy link
Member

Actually I think it would be more safe if we only do that for the getPreparedSendBtcTx method.
Now we call getPreparedSendTx from there but we could add a param to signal if segwit is permitted for outputs or not. that way we would ensure that for sending bsq it would fail when receiver address is segwit.

@oscarguindzberg I'll merge it as soon as chimp's comment is addressed.

@oscarguindzberg
Copy link
Contributor Author

Just fixed the code to address @chimp1984 's comment.

Copy link
Contributor

@chimp1984 chimp1984 left a comment

Choose a reason for hiding this comment

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

utACK

@ripcurlx ripcurlx merged commit e30a7e0 into bisq-network:release/v1.4.0 Oct 13, 2020
@oscarguindzberg oscarguindzberg deleted the fixSendNonBsq branch October 21, 2020 19:48
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.

None yet

3 participants