-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fix handling of expired credentials in VaultDeposit
#5452
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #5452 +/- ##
=======================================
Coverage 78.7% 78.7%
=======================================
Files 816 816
Lines 70534 70542 +8
Branches 8284 8287 +3
=======================================
+ Hits 55477 55485 +8
Misses 15057 15057
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
8a84fc6
to
81b7c0a
Compare
81b7c0a
to
eae690a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change won't affect Clio because VaultDeposit
is a transaction , but LGTM 👍
High Level Overview of Change
Return
tecEXPIRED
fromVaultDeposit
to allow theTransactor
to remove the expired credentials.Context of Change
Single Asset Vault #5224 added
VaultDeposit
which callsenforceMPTokenAuthorization
to check domainbased permissions of the depositor, which in turn calls
verifyValidDomain
. Unfortunately both functions, as added in #5224, will generalize the "credentials not found" result totecNO_AUTH
andtecNO_PERMISSION
rather than returntecEXPIRED
as required byTransactor
to actually carry out deletion of expired credentials. This change fixes the problem and extends the unit tests.Before this change, expired credentials will not be deleted if
VaultDeposit
fails when only expired credentials are found. With this change, the reason for transaction failure will change, and the expired credentials will be no longer kept in the ledger unnecessarily.Type of Change
.gitignore
, formatting, dropping support for older tooling)