Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(SPV-1225): add confirm contacts admin api function
Browse files Browse the repository at this point in the history
jakubmkowalski committed Dec 3, 2024
1 parent ef4620b commit 6ac1b1c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions http.go
Original file line number Diff line number Diff line change
@@ -1106,6 +1106,17 @@ func (wc *WalletClient) AdminRejectContact(ctx context.Context, id string) (*mod
return &contact, WrapError(err)
}

// AdminConfirmContacts executes an HTTP POST request to confirm a contact using their xPubs IDs and paymails.
func (wc *WalletClient) AdminConfirmContacts(ctx context.Context, contacts []*models.ContactConfirmationData) error {

Check failure on line 1110 in http.go

GitHub Actions / test (ubuntu-latest)

undefined: models.ContactConfirmationData
jsonBytes, err := json.Marshal(contacts)
if err != nil {
return WrapError(err)
}

err = wc.doHTTPRequest(ctx, http.MethodPost, "/admin/contacts/confirmations", jsonBytes, wc.adminXPriv, true, nil)
return WrapError(err)
}

// FinalizeTransaction will finalize the transaction
func (wc *WalletClient) FinalizeTransaction(draft *models.DraftTransaction) (string, error) {
res, err := GetSignedHex(draft, wc.xPriv)

0 comments on commit 6ac1b1c

Please sign in to comment.