Skip to content

Commit

Permalink
Merge pull request #307 from kommitters/v0.15
Browse files Browse the repository at this point in the history
Release v0.15.1
  • Loading branch information
miguelnietoa authored Jun 13, 2023
2 parents 9d3d258 + 6f39334 commit ff444b7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.15.1 (13.06.2023)

* Fix `SCAddress` contract type.

## 0.15.0 (05.06.2023)
* Add Soroban Preview 9 support.
* Add Soroban examples.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The **Stellar SDK** is composed of two complementary components: **`TxBuild`** +
```elixir
def deps do
[
{:stellar_sdk, "~> 0.15.0"}
{:stellar_sdk, "~> 0.15.1"}
]
end
```
Expand Down
3 changes: 2 additions & 1 deletion lib/tx_build/sc_address.ex
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ defmodule Stellar.TxBuild.SCAddress do
end

def to_xdr(%__MODULE__{type: :contract, value: value}) do
type = SCAddressType.new(:SC_ADDRESS_contract)
type = SCAddressType.new(:SC_ADDRESS_TYPE_CONTRACT)

value
|> KeyPair.raw_contract()
|> Hash.new()
|> SCAddress.new(type)
end
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Stellar.MixProject do
use Mix.Project

@github_url "https://github.com/kommitters/stellar_sdk"
@version "0.15.0"
@version "0.15.1"

def project do
[
Expand Down
8 changes: 6 additions & 2 deletions test/tx_build/sc_address_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,12 @@ defmodule Stellar.TxBuild.SCAddressTest do

test "to_xdr when type is contract", %{contract: contract} do
%SCAddress{
sc_address: %Hash{value: "CCEMOFO5TE7FGOAJOA3RDHPC6RW3CFXRVIGOFQPFE4ZGOKA2QEA636SN"},
type: %SCAddressType{identifier: :SC_ADDRESS_contract}
sc_address: %Hash{
value:
<<136, 199, 21, 221, 153, 62, 83, 56, 9, 112, 55, 17, 157, 226, 244, 109, 177, 22, 241,
170, 12, 226, 193, 229, 39, 50, 103, 40, 26, 129, 1, 237>>
},
type: %SCAddressType{identifier: :SC_ADDRESS_TYPE_CONTRACT}
} = contract |> TxSCAddress.new() |> TxSCAddress.to_xdr()
end
end

0 comments on commit ff444b7

Please sign in to comment.