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

[sql-3] accounts: replace calls to UpdateAccount #939

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ellemouton
Copy link
Member

@ellemouton ellemouton commented Jan 16, 2025

(similar PR description to #938 but they are not dependent on each other)

To prepare the accounts.Store to be more SQL compatible, we will want to replace the current
UpdateAccount method. Today it takes a full OffChainAccount struct, serialises it and replaces
any existing in the DB. This method is not very SQL appropriate as the better pattern is to instead
have specific update methods that read: "Update field X and account with ID Y".

So this PR starts this process of adding more SQL friendly methods to the interface and thereby
phasing out the use of UpdateAccount. By doing so, we also move very kvdb specific logic out
of the accounts.InterceptorService.

I'm splitting this up over about 3 or 4 PRs since some of the replacements are more complicated than
others.

This PR focuses on the calls that edit/add account payments:

  • UpsertAccountPayment
  • DeleteAccountPayment

@ellemouton ellemouton added no-changelog This PR is does not require a release notes entry sql-ize labels Jan 16, 2025
@ellemouton ellemouton self-assigned this Jan 16, 2025
And use it in the InterceptorService's paymentUpdate method.
And use it instead of UpdateAccount.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog This PR is does not require a release notes entry sql-ize
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant