From dddc8f55e22dde61e3812619bdb96fe79f849829 Mon Sep 17 00:00:00 2001 From: Jonathan Allard Date: Sat, 6 Jun 2020 20:38:50 -0400 Subject: [PATCH] Client#submit_tx: Fix Base64 encoding by using envelope.to_xdr(:base64) Ruby's standard Base64.encode64 inserts newline separators by default, which Horizon doesn't accept. --- sdk/lib/stellar/client.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/lib/stellar/client.rb b/sdk/lib/stellar/client.rb index c62db067..93da8908 100644 --- a/sdk/lib/stellar/client.rb +++ b/sdk/lib/stellar/client.rb @@ -199,7 +199,7 @@ def submit_transaction(tx_envelope:, options: {skip_memo_required_check: false}) unless options[:skip_memo_required_check] check_memo_required(tx_envelope) end - @horizon.transactions._post(tx: Base64.encode64(tx_envelope.to_xdr)) + @horizon.transactions._post(tx: tx_envelope.to_xdr(:base64)) end # Required by SEP-0029