-
Notifications
You must be signed in to change notification settings - Fork 11
feat: include leader public key when adding funds #105
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
base: main
Are you sure you want to change the base?
Conversation
client-vms/src/vm/builder.ts
Outdated
| if ( | ||
| !leaderClusterInfo.publicKeys || | ||
| !leaderClusterInfo.publicKeys.authentication | ||
| ) |
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.
Nit, but i think this simplifies to: if (!leaderClusterInfo.publicKeys?.authentication) {}
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.
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 I was just copying that pattern
client-vms/src/vm/builder.ts
Outdated
| .id(user_id) | ||
| .signer(signer) | ||
| .leader(leader.transport) | ||
| .leaderPublicKey(leaderClusterInfo.publicKeys?.authentication) |
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.
nit: is this not type narrowed? eg I think it should be fine as .leaderPublicKey(leaderClusterInfo.publicKeys.authentication)

This implements the new leader public key logic for add-funds introduced in NillionNetwork/nilvm#67