-
Notifications
You must be signed in to change notification settings - Fork 17
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
Optional Account ID in signin flow #100
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.
LGTM
let user_recovery_pk = get_user_recovery_pk(internal_acc_id.clone()); | ||
let user_recovery_sk = get_user_recovery_sk(internal_acc_id); | ||
let new_public_key: PublicKey = request | ||
.public_key | ||
.parse() | ||
.map_err(|e| AddKeyError::MalformedPublicKey(request.public_key, e))?; | ||
|
||
let user_account_id: AccountId = match &request.near_account_id { |
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.
Should we handle the error case of it being a list of IDs with this controlling key?
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.
We are just taking the first one now. There will be no error.
Also, we are using recovery PK. Since we allow anly one acc per our internal (firebase) Id, thre should always be one account.
Added MPC_RECOVERY_ACCOUNT_LOOKUP_URL to our cloud run (both prod/mainnet and dev/testnet).
Added unit test, Integration test will require a whole wallet server or some kind of mocked get_acc function. I think we should pospone this.