Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: upsert contact didn't work with accessKeys #556

Merged
merged 3 commits into from
Apr 22, 2024

Conversation

chris-4chain
Copy link
Contributor

@chris-4chain chris-4chain commented Apr 19, 2024

Unlike as we do for the other contact endpoints, the upsert endpoint function relied on xpub instead of xpub_hash.
Because the -web-backend uses accessKeys for requests authorization, the upsert didn't work.

More context here:
https://github.com/bitcoin-sv/spv-wallet/blob/fix-upsert-contact/server/auth/middleware.go#L81-L120

Pull Request Checklist

  • 📖 I created my PR using provided : CODE_STANDARDS
  • 📖 I have read the short Code of Conduct: CODE_OF_CONDUCT
  • 🏠 I tested my changes locally.
  • ✅ I have provided tests for my changes.
  • 📝 I have used conventional commits.
  • 📗 I have updated any related documentation.
  • 💾 PR was issued based on the Github or Jira issue.

@chris-4chain chris-4chain requested a review from a team as a code owner April 19, 2024 12:29
Copy link

github-actions bot commented Apr 19, 2024

Manual Tests

💚 Manual testing by @arkadiuszos4chain resulted in success.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 53.17%. Comparing base (cffc32a) to head (5c2375d).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #556      +/-   ##
==========================================
- Coverage   53.17%   53.17%   -0.01%     
==========================================
  Files         194      194              
  Lines       10896    10895       -1     
==========================================
- Hits         5794     5793       -1     
  Misses       4553     4553              
  Partials      549      549              
Flag Coverage Δ
unittests 53.17% <60.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
engine/action_contact.go 63.33% <100.00%> (-0.25%) ⬇️
actions/contacts/upsert.go 0.00% <0.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cffc32a...5c2375d. Read the comment docs.

@arkadiuszos4chain arkadiuszos4chain added the tested PR was tested by a team member label Apr 22, 2024
@chris-4chain chris-4chain merged commit eb1cf14 into main Apr 22, 2024
13 checks passed
@chris-4chain chris-4chain deleted the fix-upsert-contact branch April 22, 2024 08:27
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
tested PR was tested by a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants