Skip to content

Commit

Permalink
fix: fix lit issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Aman035 committed Jun 10, 2024
1 parent d0ea056 commit 660670f
Show file tree
Hide file tree
Showing 4 changed files with 4,432 additions and 3,123 deletions.
2 changes: 1 addition & 1 deletion packages/restapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
},
"dependencies": {
"@lit-protocol/lit-node-client": "^5.0.0",
"@lit-protocol/lit-node-client": "^5.1.0",
"@metamask/eth-sig-util": "^5.0.2",
"buffer": "^6.0.3",
"crypto-js": "^4.1.1",
Expand Down
4 changes: 0 additions & 4 deletions packages/restapi/src/lib/helpers/crypto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -522,10 +522,6 @@ export const encryptPGPKey = async (
PARTS,
QUORUM
);

console.info('Shards');
console.info(shard1, shard2, shard3);

// 3. Encrypt private key with secret
const enc = new TextEncoder();
const encodedPrivateKey = enc.encode(privateKey);
Expand Down
7 changes: 4 additions & 3 deletions packages/restapi/src/lib/helpers/lit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class Lit {
{
contractAddress: '',
standardContractType: '',
chain: this.chain,
chain: 'ethereum',
method: '',
parameters: [':userAddress'],
returnValueTest: {
Expand Down Expand Up @@ -72,7 +72,7 @@ export class Lit {
const authSig = {
sig: signature,
derivedVia: 'EIP1271',
signedMessage: messageToSign,
signedMessage: viem.hashMessage(messageToSign),
address,
};
return authSig;
Expand All @@ -94,7 +94,7 @@ export class Lit {
{
accessControlConditions: this.accessControlConditions,
authSig,
// `ethereum` chain is valid for all EVM chains
// chain on which the wallet exists
chain: this.chain,
dataToEncrypt,
},
Expand Down Expand Up @@ -130,6 +130,7 @@ export class Lit {
ciphertext,
dataToEncryptHash,
authSig,
// chain on which the wallet exists
chain: this.chain,
},
this.litNodeClient
Expand Down
Loading

0 comments on commit 660670f

Please sign in to comment.