Skip to content

Commit

Permalink
chore: add support for max_payout_sats
Browse files Browse the repository at this point in the history
  • Loading branch information
bodymindarts committed Mar 28, 2024
1 parent 52579d4 commit 5c294a4
Show file tree
Hide file tree
Showing 9 changed files with 1,743 additions and 1,487 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ HOSTNAME=galoymoney
PROTO_DIR := proto/vendor
PROTO_OUTPUT_DIR := bria/proto

version = 0.0.13
version = 0.0.14
os_arch = $(shell go env GOOS)_$(shell go env GOARCH)
provider_path = registry.terraform.io/galoymoney/bria/$(version)/$(os_arch)/

Expand Down
15 changes: 14 additions & 1 deletion bria/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,19 @@ func (c *AccountClient) CreateProfile(name string, policy *briav1.SpendingPolicy
return res, nil
}

func (c *AccountClient) UpdateProfile(id string, policy *briav1.SpendingPolicy) (*briav1.UpdateProfileResponse, error) {
req := &briav1.UpdateProfileRequest{
Id: id,
SpendingPolicy: policy,
}
ctx := context.Background()
res, err := c.service.UpdateProfile(ctx, req)
if err != nil {
return nil, err
}
return res, nil
}

func (c *AccountClient) CreateStaticAddress(id, wallet string) (*briav1.NewAddressResponse, error) {
req := &briav1.NewAddressRequest{
WalletName: wallet,
Expand Down Expand Up @@ -108,7 +121,7 @@ func (c *AccountClient) DeleteStaticAddress(address string) error {
}
_, err := c.service.UpdateAddress(ctx, updateAddressRequest)
if err != nil {
return fmt.Errorf("error fetching profiles: %w", err)
return fmt.Errorf("error fetching static address: %w", err)
}

return nil
Expand Down
Loading

0 comments on commit 5c294a4

Please sign in to comment.