-
Notifications
You must be signed in to change notification settings - Fork 79
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
Session Key Manager module implementation #258
Session Key Manager module implementation #258
Conversation
SMA-61 Session Key Manager Module implementation
Implement the SessionKeyManagerModule with
|
…into SMA-61-SessionManager
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.
left some comments
instance.sessionStorageClient = new SessionLocalStorage(moduleConfig.smartAccountAddress) | ||
|
||
const existingSessionData = await instance.sessionStorageClient.getAllSessionData() | ||
const existingSessionDataLeafs = existingSessionData.map((sessionData) => { |
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.
Exclude the sessions whose validUltil date has passed or status is EXPIRED.
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.
I believe the merkle tree will still have the data its just it will be validate on chain? It should have all the data as per the discussion we had today
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.
Yeah as per the discussion, all the pending state sessions should be part of the merkle tree. Even though this recommended change doesn't affect the functionality in any way but it's just optimised way of doing things, where we can get rid of expired session leafs.
Coz over time the leaves will keep on getting added and there's a limit of data that can be stored in local storage.
Not critical but we can add a TODO here to handle this later may be.
SessionKeyManagerModule implementation
User flow to add a session key
User flow to do a transaction with session key