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

txnbuild: Fix manage data value in sep10 challenge #1569

Merged
merged 3 commits into from
Aug 8, 2019

Conversation

poliha
Copy link
Contributor

@poliha poliha commented Aug 7, 2019

This PR uses the correct length of bytes for the manage data value.
As per the protocol

The value must be 64 bytes long. It contains a 48 byte cryptographic-quality random string encoded using base64 (for a total of 64 bytes after encoding).

Closes #1562

@poliha poliha added the txnbuild 2nd-generation transaction build library for Go SDK label Aug 7, 2019
@poliha poliha added this to the horizonclient 1.4.0 milestone Aug 7, 2019
txnbuild/transaction.go Show resolved Hide resolved
txnbuild/transaction.go Outdated Show resolved Hide resolved
@poliha poliha requested a review from abuiles August 7, 2019 16:48
txnbuild/transaction_test.go Outdated Show resolved Hide resolved
@poliha poliha requested a review from abuiles August 7, 2019 18:28
Copy link
Contributor

@abuiles abuiles left a comment

Choose a reason for hiding this comment

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

LGTM 👍

if len(randomNonce) != 64 {
// Encode 48-byte nonce to base64 for a total of 64-bytes
randomNonceToString := base64.StdEncoding.EncodeToString(randomNonce)
if len(randomNonceToString) != 64 {
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: I don't think we need this check here -- we already have an unit test.

@poliha poliha merged commit 373f870 into release-horizonclient-v1.4.0 Aug 8, 2019
@poliha poliha deleted the fix-sep10-challenge branch August 8, 2019 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
txnbuild 2nd-generation transaction build library for Go SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants