-
Notifications
You must be signed in to change notification settings - Fork 4
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
RFC: France copy receipt #192
Conversation
One thing that we can also consider as potential solution is using the RawData that is stored in the JournalFR. For CopyReceipts we are only considering items with Type 'C'. These items include the JWT token the data for those 'C' entries has always the same format:
We should be able to parse this data from JournalFR and group by the crrs IMO private int GetCountOfExistingCopies(string cbPreviousReceiptReference)
{
var count = 0;
var copyJournals = parentStorage.JournalFRTableByType("C");
foreach (var journal in copyJournals)
{
var handler = new JwtSecurityTokenHandler(); // or something similar for reading jwt tokens
var jwtSecurityToken = handler.ReadJwtToken(token);
var copiedReceiptReference = tokenS.Claims.First(claim => claim.Type == "crr").Value;
if (copiedReceiptReference == cbPreviousReceiptReference)
{
count++;
}
}
return count;
} |
This suggestion has been added to the RFC and released to sandbox as the first |
Adding a
ftJournalFRCopyReceipts
table in the FR Queue where we store copy receipts.Rendered