-
Notifications
You must be signed in to change notification settings - Fork 46
Client#submit_tx.: Fix Base64 encoding #96
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
Conversation
|
@joallard Thank you for the quick update! I know it's a lot more back and forth than you would expect for a one-liner change, but it seems that Rubocop is unhappy now because the single-quoted string literals violate the standard style guide we're adopting for this SDK (in case you're interested, we have a blog post which outlines the reasons behind this practice). Both double-quoted string literal and symbol would be in line with a style guide, although using |
|
No problem, I personally prefer up-to-the-notch code. I'll amend that real quick. |
Ruby's standard Base64.encode64 inserts newline separators by default, which Horizon doesn't accept.
|
Kudos, SonarCloud Quality Gate passed!
|
nebolsin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:lgtm:
|
I also wholeheartedly agree that in this case, 'base64' is not semantically a string, but rather a symbol, as it's code rather than data. The case/when's on the other side, which I tried to match, had confused me ;) Gotta admire the commitment to real good code! (That said that makes me wonder about my other PR in which I took way more Ruby artistic license haha!) |
|
Ah, good job on the cherry-picking and commit message rewording @nebolsin, this is very well phrased. It's the little things, as they say! |
|
Very nice catch on this regression. Thank you! 👍 |
Without strict, produces newline characters which Horizon will reject
(Split from #95:)
And so I was getting some TransactionMalformed errors. Looks like this is because Base64.encode64 by default inserts some newlines, which Horizon doesn't like.
The tests probably didn't catch this because of some combination of using VCR and upgrades on our side.