We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b962ab commit 035b1e5Copy full SHA for 035b1e5
packages/loopring-sdk/src/lib/generateKeyPair.ts
@@ -38,6 +38,19 @@ export async function generateKeyPair({
38
39
let generatedKeyPair = await generateKeyPairWasm(result.signature);
40
41
+ // Missing 02 suffix. Needed when Loopring Wallet doesn't add it.
42
+ if (
43
+ publicKey &&
44
+ result.signature.length === 132 &&
45
+ publicKey.x &&
46
+ publicKey.y &&
47
+ (!hexEqual(generatedKeyPair.formatedPx, publicKey.x) ||
48
+ !hexEqual(generatedKeyPair.formatedPy, publicKey.y))
49
+ ) {
50
+ generatedKeyPair = await generateKeyPairWasm(`${result.signature}02`);
51
+ }
52
+
53
+ // I don't know why this is needed. Ported from the original code.
54
if (
55
publicKey &&
56
result.signature.length > 3 &&
0 commit comments