Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Fix for missing default model options
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed Mar 31, 2022
1 parent dde03d3 commit 5c8aedb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions action_paymails.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func (c *Client) NewPaymailAddress(ctx context.Context, xPubKey, address string,
ctx = c.GetOrStartTxn(ctx, "new_paymail_address")

// Start the new paymail address model
paymailAddress := newPaymail(address, append(opts, New(), WithXPub(xPubKey))...)
paymailAddress := newPaymail(address, append(opts, c.DefaultModelOptions(New(), WithXPub(xPubKey))...)...)

// Save the model
if err := paymailAddress.Save(ctx); err != nil {
Expand All @@ -31,7 +31,7 @@ func (c *Client) DeletePaymailAddress(ctx context.Context, address string, opts
ctx = c.GetOrStartTxn(ctx, "delete_paymail_address")

// Get the paymail address
paymailAddress, err := getPaymail(ctx, address, opts...)
paymailAddress, err := getPaymail(ctx, address, append(opts, c.DefaultModelOptions()...)...)
if err != nil {
return err
} else if paymailAddress == nil {
Expand Down Expand Up @@ -62,7 +62,7 @@ func (c *Client) UpdatePaymailAddressMetadata(ctx context.Context, address strin
ctx = c.GetOrStartTxn(ctx, "update_paymail_address_metadata")

// Get the paymail address
paymailAddress, err := getPaymail(ctx, address, opts...)
paymailAddress, err := getPaymail(ctx, address, append(opts, c.DefaultModelOptions()...)...)
if err != nil {
return nil, err
} else if paymailAddress == nil {
Expand Down

0 comments on commit 5c8aedb

Please sign in to comment.