@@ -11,32 +11,35 @@ export default class SignatureVerifier {
11
11
}
12
12
13
13
public async assertValidSignature (
14
- price : PriceDataWithSignature ,
14
+ _price : PriceDataWithSignature ,
15
15
) : Promise < void > {
16
- const signedData = this . getPriceSignedData ( price ) ;
17
- const publicKey = price . providerPublicKey ;
18
-
19
- const validSignature = await this . arweaveProxy . verifySignature ( {
20
- signedData,
21
- signature : price . signature ,
22
- signerPublicKey : publicKey ,
23
- } ) ;
24
-
25
- const addressFromPublicKey = await this . arweaveProxy . arweaveClient . wallets . ownerToAddress (
26
- publicKey ,
27
- ) ;
28
-
29
- if ( ! validSignature ) {
30
- throw new Error ( "Signature verification failed for price: " + signedData ) ;
31
- }
32
-
33
- if ( addressFromPublicKey !== price . provider ) {
34
- throw new Error (
35
- `Provider address doesn't match the public key.` +
36
- ` Address: ${ price . provider } .` +
37
- ` Public key: ${ publicKey } .` ,
38
- ) ;
39
- }
16
+ // We've decided to disable signing with Arweave signature
17
+ // and use only EVM compatible signatures instead
18
+
19
+ // const signedData = this.getPriceSignedData(price);
20
+ // const publicKey = price.providerPublicKey;
21
+
22
+ // const validSignature = await this.arweaveProxy.verifySignature({
23
+ // signedData,
24
+ // signature: price.signature,
25
+ // signerPublicKey: publicKey,
26
+ // });
27
+
28
+ // const addressFromPublicKey = await this.arweaveProxy.arweaveClient.wallets.ownerToAddress(
29
+ // publicKey,
30
+ // );
31
+
32
+ // if (!validSignature) {
33
+ // throw new Error("Signature verification failed for price: " + signedData);
34
+ // }
35
+
36
+ // if (addressFromPublicKey !== price.provider) {
37
+ // throw new Error(
38
+ // `Provider address doesn't match the public key.` +
39
+ // ` Address: ${price.provider}.` +
40
+ // ` Public key: ${publicKey}.`,
41
+ // );
42
+ // }
40
43
}
41
44
42
45
private getPriceSignedData ( price : PriceDataWithSignature ) {
0 commit comments