Skip to content

Commit f20703f

Browse files
Remove dependency on clients/horizon
1 parent a83ffec commit f20703f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

txnbuild/set_options.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package txnbuild
22

33
import (
4-
"github.com/stellar/go/clients/horizon"
4+
hProtocol "github.com/stellar/go/protocols/horizon"
55
"github.com/stellar/go/support/errors"
66
"github.com/stellar/go/xdr"
77
)
@@ -35,7 +35,7 @@ type Signer struct {
3535

3636
// SignerFromHorizon converts a signer retrieved from Horizon to a txnbuild
3737
// Signer.
38-
func SignerFromHorizon(horizonSigner horizon.Signer) Signer {
38+
func SignerFromHorizon(horizonSigner hProtocol.Signer) Signer {
3939
return Signer{
4040
Address: horizonSigner.Key,
4141
Weight: Threshold(horizonSigner.Weight),
@@ -44,7 +44,7 @@ func SignerFromHorizon(horizonSigner horizon.Signer) Signer {
4444

4545
// SignersFromHorizon converts a list of signers retrieved from Horizon to
4646
// txnbuild Signers.
47-
func SignersFromHorizon(horizonSigners []horizon.Signer) []Signer {
47+
func SignersFromHorizon(horizonSigners []hProtocol.Signer) []Signer {
4848
signers := make([]Signer, 0, len(horizonSigners))
4949
for _, hs := range horizonSigners {
5050
signers = append(signers, SignerFromHorizon(hs))

txnbuild/set_options_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package txnbuild
33
import (
44
"testing"
55

6-
"github.com/stellar/go/clients/horizon"
6+
hProtocol "github.com/stellar/go/protocols/horizon"
77
"github.com/stellar/go/xdr"
88
"github.com/stretchr/testify/assert"
99
)
@@ -139,14 +139,14 @@ func TestEmptyHomeDomainOK(t *testing.T) {
139139
}
140140

141141
func TestSignerFromHorizon(t *testing.T) {
142-
horizonSigner := horizon.Signer{Key: "GAABGBW5DINUS456OTHH6IUPTQSQZVVFCZGAO467OLIPFUWTMV6XR5XS", Weight: 10}
142+
horizonSigner := hProtocol.Signer{Key: "GAABGBW5DINUS456OTHH6IUPTQSQZVVFCZGAO467OLIPFUWTMV6XR5XS", Weight: 10}
143143
wantSigner := Signer{Address: "GAABGBW5DINUS456OTHH6IUPTQSQZVVFCZGAO467OLIPFUWTMV6XR5XS", Weight: 10}
144144
signer := SignerFromHorizon(horizonSigner)
145145
assert.Equal(t, wantSigner, signer)
146146
}
147147

148148
func TestSignersFromHorizon(t *testing.T) {
149-
horizonSigners := []horizon.Signer{
149+
horizonSigners := []hProtocol.Signer{
150150
{Key: "GAABGBW5DINUS456OTHH6IUPTQSQZVVFCZGAO467OLIPFUWTMV6XR5XS", Weight: 0},
151151
{Key: "GAT4FUGQNKOIDLOIXCJJYFSAFJHQY5MZEZLRBXXFKDCXGUHJQ63XZFTD", Weight: 10},
152152
{Key: "GCB35H32SU5ME4OALQUPOM4AADJICL2H2NLWAGLOMMTSYOVTXWYP6Q4T", Weight: 100},

0 commit comments

Comments
 (0)