-
Notifications
You must be signed in to change notification settings - Fork 13
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
fixes related to metadata backends #117
Conversation
// deriving address from pub key coz pubkey is always available | ||
// but finalPrivKey won't be available for v2 user upgraded to 2/n | ||
let finalEvmAddress = ""; | ||
if (finalPubKey) { |
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.
in wht scenario finalPubKey won't be available ?
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.
the bug scenario where metadata doesn't come
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.
it should throw when metadata is missing right?
@@ -33,8 +33,8 @@ export function generateMetadataParams(ecCurve: ec, serverTimeOffset: number, me | |||
}; | |||
const sig = key.sign(keccak256(Buffer.from(stringify(setData), "utf8")).slice(2)); | |||
return { | |||
pub_key_X: key.getPublic().getX().toString("hex", 64), | |||
pub_key_Y: key.getPublic().getY().toString("hex", 64), | |||
pub_key_X: key.getPublic().getX().toString("hex"), // DO NOT PAD THIS. BACKEND DOESN'T |
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 should update backend isn't it? Coz there might still be 0's in front which can get lost on the network.
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.
can't update backend due to legacy reasons.
0's don't get lost because we always transmit strings across network
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
// deriving address from pub key coz pubkey is always available | ||
// but finalPrivKey won't be available for v2 user upgraded to 2/n | ||
let finalEvmAddress = ""; | ||
if (finalPubKey) { |
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.
it should throw when metadata is missing right?
No description provided.