-
Notifications
You must be signed in to change notification settings - Fork 107
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
Walletlib: Multi Account Auth Repo #753
Conversation
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.
For my own understanding, summarizing the changes:
- Add the
parentId
field to an Account - Add DB migration code for version 5/6
- Add multi account to AuthRepo
- Add multi account API to onComplete methods
Changes look good and make sense to me from a high level.Thorough testing with an example app would help reveal any issues.
@Nullable String[] chains, @Nullable String[] features); | ||
|
||
// @Nullable | ||
// List<AccountRecord> query(int parentId); |
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.
intentionally commented out?
// migrate to multi account structure | ||
Log.w(TAG, "Old database schema detected; pre-v2.1.0, migrating to multi account structure"); | ||
|
||
// try (final Cursor cursor = db.rawQuery("SELECT " + |
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.
Intentionally left commented?
/* package */ class AccountRecord { | ||
@IntRange(from = 1) | ||
final int id; | ||
|
||
@IntRange(from = 1) | ||
final int parentId; |
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.
To clarify, the parentId
of an account will always be the id of the "authRecord" that the account is associated with, correct?
Curios, why its called parentId
instead of authRecordId
? Is there another possible value it can be?
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.
to align with the schema. Parent id is used to indicate that this is a subtable
This PR addresses what should be the final refactor update to support multi-account through the entire MWA SDK stack. (#44 & #438)
The walletlib sdk authentication repository has been updated to support multiple authorized accounts (publickeys) per AuthRecord. The rest of the SDK stack was previously updated to support a list of accounts for each auth request.
Note: sample apps still need to be updated to demonstrate the use of multiple accounts in a session