Skip to content

Commit

Permalink
fix: sync and solve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelbrm committed May 29, 2024
2 parents e773e57 + d3b91f4 commit 46ba622
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions libs/wallet/provider/uphold/uphold.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ const (

const (
// The Intermediate Certificates
sandboxFingerprint = "h+8wXc+BABb/V9q7PN5I8xVpTJCzmi2RDJR5nmml3Ac="
prodFingerprint = "h+8wXc+BABb/V9q7PN5I8xVpTJCzmi2RDJR5nmml3Ac="
sandboxFingerprint = "tl2IZaqu6xeE6iVuJmPIKsJW5N88W1nysF1WZE1THFs="
prodFingerprint = "tl2IZaqu6xeE6iVuJmPIKsJW5N88W1nysF1WZE1THFs="
)

var (
Expand Down
11 changes: 4 additions & 7 deletions services/skus/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,10 @@ func (s *Service) CreateOrderItemCredentials(ctx context.Context, orderID, itemI
func (s *Service) doCredentialsExist(ctx context.Context, requestID uuid.UUID, item *model.OrderItem, blindedCreds []string) error {
switch item.CredentialType {
case timeLimitedV2:
// NOTE: This creates a possible race to submit between clients.
// Multiple signing request outboxes can be created since their
// uniqueness constraint is on the request id.
// Despite this, the uniqueness constraint of time_limited_v2_order_creds ensures that
// only one set of credentials is written for each order / item & time interval.
// As a result, one client will successfully unblind the credentials and
// the others will fail.
// NOTE: There was a possible race condition that would allow exceeding limits on the number of cred batches.
// The condition is currently mitigated by:
// - checking the number of active batches before accepting a request to create creds;
// - checking the number of active batches before inserting the signed creds.

return s.doTLV2Exist(ctx, requestID, item, blindedCreds)
default:
Expand Down

0 comments on commit 46ba622

Please sign in to comment.