Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(SPV-1225): add admin confirmation for contacts #301

Merged
merged 5 commits into from
Dec 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions http.go
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,17 @@
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

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

undefined: models.ContactConfirmationData
ac4ch marked this conversation as resolved.
Show resolved Hide resolved
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)
Expand Down
Loading