Skip to content

Commit f2d6904

Browse files
committed
use latest client
1 parent 8aafe91 commit f2d6904

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

node-registrar/client/farm.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,6 @@ func parseUpdateFarmOpts(update FarmUpdate) map[string]any {
286286
if update.StellarAddress != nil {
287287
data["stellar_address"] = *update.StellarAddress
288288
}
289-
if len(cfg.stellarAddress) != 0 {
290-
data["stellar_address"] = cfg.stellarAddress
291-
}
292289

293290
if update.Dedicated != nil {
294291
data["dedicated"] = *update.Dedicated

registrar-cli/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module github.com/threefoldtech/tfgrid4-sdk-go/registrar-cli
33
go 1.21.0
44

55
require (
6+
github.com/pkg/errors v0.9.1
67
github.com/rs/zerolog v1.33.0
78
github.com/spf13/cobra v1.9.1
89
github.com/threefoldtech/tfgrid4-sdk-go/node-registrar v0.0.0-20250226194238-c27651fbdd6e
@@ -12,7 +13,6 @@ require (
1213
github.com/inconshreveable/mousetrap v1.1.0 // indirect
1314
github.com/mattn/go-colorable v0.1.13 // indirect
1415
github.com/mattn/go-isatty v0.0.20 // indirect
15-
github.com/pkg/errors v0.9.1 // indirect
1616
github.com/spf13/pflag v1.0.6 // indirect
1717
golang.org/x/sys v0.28.0 // indirect
1818
)

registrar-cli/go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
2525
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
2626
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
2727
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
28-
github.com/threefoldtech/tfgrid4-sdk-go/node-registrar v0.0.0-20250226140024-dc119126c93f h1:IJ0BULHQuYWT6UFFiZEhEB0QyFSSbyCPgcKaAVII4a4=
29-
github.com/threefoldtech/tfgrid4-sdk-go/node-registrar v0.0.0-20250226140024-dc119126c93f/go.mod h1:x6Sluj6YKfelWzcNwsD2oqGO8dpRlH7fbmeIqEsK8hI=
3028
github.com/threefoldtech/tfgrid4-sdk-go/node-registrar v0.0.0-20250226194238-c27651fbdd6e h1:n/hq2t7txZNuQ53EMR+ikwvu3bSvZIerm1d6JiXbmro=
3129
github.com/threefoldtech/tfgrid4-sdk-go/node-registrar v0.0.0-20250226194238-c27651fbdd6e/go.mod h1:x6Sluj6YKfelWzcNwsD2oqGO8dpRlH7fbmeIqEsK8hI=
3230
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

registrar-cli/internal/cmd/farm.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,18 @@ func UpdateFarm(farmID uint64, mnemonic, network, farmName, stellarAddress strin
5959
return err
6060
}
6161

62-
var opts []client.UpdateFarmOpts
62+
var opts client.FarmUpdate
6363
if len(farmName) > 0 {
64-
opts = append(opts, client.UpdateFarmWithName(farmName))
64+
opts.FarmName = &farmName
6565
}
6666

6767
if dedicated {
68-
opts = append(opts, client.UpdateFarmWithDedicated())
68+
trueVal := true
69+
opts.Dedicated = &trueVal
6970
}
7071
if len(stellarAddress) != 0 {
71-
opts = append(opts, client.UpdateFarmWithStellarAddress(stellarAddress))
72+
opts.StellarAddress = &stellarAddress
7273
}
7374

74-
return cli.UpdateFarm(farmID, opts...)
75+
return cli.UpdateFarm(farmID, opts)
7576
}

0 commit comments

Comments
 (0)