You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// To ensure every offer ID is unique we require that each is a number greater
// than has ever been used. This high water mark is sufficient to track that.
lastOfferId: 0,
Description of the Design
Requirement #1 is more the concern of the client, so leave it to them. If you push an offer with a colliding ID, vstorage publishing is undefined. It's easy to ensure they're unique by using UUID or a high-precision timestamp.
Requirement #2 already has a collection of ids that could collide, in the keys of those maps. If an offer will collide there, through an exception.
Security Considerations
--
Test Plan
This should be backwards compatible, but do integration testing with the Wallet UI.
The text was updated successfully, but these errors were encountered:
What is the Problem Being Solved?
Each offer to the smart wallet has a unique offer ID, which fulfills two requirements:
offerToUsedInvitation
,offerToInvitationMakers
) have a stable unique key.To avoid keeping track of every offer id, we opted for a high water mark of a serial number:
agoric-sdk/packages/smart-wallet/src/smartWallet.js
Lines 184 to 186 in 6cdbe3f
Description of the Design
Requirement #1 is more the concern of the client, so leave it to them. If you push an offer with a colliding ID, vstorage publishing is undefined. It's easy to ensure they're unique by using UUID or a high-precision timestamp.
Requirement #2 already has a collection of ids that could collide, in the keys of those maps. If an offer will collide there, through an exception.
Security Considerations
--
Test Plan
This should be backwards compatible, but do integration testing with the Wallet UI.
The text was updated successfully, but these errors were encountered: