@0xsequence/replacer 0.0.0-20240402220106 → 0.0.0-20240408185635

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -95,7 +95,7 @@ async function runByEIP5719(address, provider, digest, signature, solver, tries
95
95
  } catch (_unused4) {}
96
96
  const altUri = await tryAwait(eip5719Contract(address, provider).getAlternativeSignature(digest));
97
97
  if (!altUri || altUri === '') throw new Error('EIP5719 - Invalid signature and no alternative signature');
98
- const altSignature = ethers.ethers.toBeHex(await (solver || new URISolverIPFS()).resolve(altUri));
98
+ const altSignature = ethers.ethers.hexlify(await (solver || new URISolverIPFS()).resolve(altUri));
99
99
  if (!altSignature || altSignature === '') throw new Error('EIP5719 - Empty alternative signature');
100
100
  if (altSignature === ethers.ethers.hexlify(signature)) {
101
101
  throw new Error('EIP5719 - Alternative signature is invalid or the same');
@@ -95,7 +95,7 @@ async function runByEIP5719(address, provider, digest, signature, solver, tries
95
95
  } catch (_unused4) {}
96
96
  const altUri = await tryAwait(eip5719Contract(address, provider).getAlternativeSignature(digest));
97
97
  if (!altUri || altUri === '') throw new Error('EIP5719 - Invalid signature and no alternative signature');
98
- const altSignature = ethers.ethers.toBeHex(await (solver || new URISolverIPFS()).resolve(altUri));
98
+ const altSignature = ethers.ethers.hexlify(await (solver || new URISolverIPFS()).resolve(altUri));
99
99
  if (!altSignature || altSignature === '') throw new Error('EIP5719 - Empty alternative signature');
100
100
  if (altSignature === ethers.ethers.hexlify(signature)) {
101
101
  throw new Error('EIP5719 - Alternative signature is invalid or the same');
@@ -91,7 +91,7 @@ async function runByEIP5719(address, provider, digest, signature, solver, tries
91
91
  } catch (_unused4) {}
92
92
  const altUri = await tryAwait(eip5719Contract(address, provider).getAlternativeSignature(digest));
93
93
  if (!altUri || altUri === '') throw new Error('EIP5719 - Invalid signature and no alternative signature');
94
- const altSignature = ethers.toBeHex(await (solver || new URISolverIPFS()).resolve(altUri));
94
+ const altSignature = ethers.hexlify(await (solver || new URISolverIPFS()).resolve(altUri));
95
95
  if (!altSignature || altSignature === '') throw new Error('EIP5719 - Empty alternative signature');
96
96
  if (altSignature === ethers.hexlify(signature)) {
97
97
  throw new Error('EIP5719 - Alternative signature is invalid or the same');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/replacer",
3
- "version": "0.0.0-20240402220106",
3
+ "version": "0.0.0-20240408185635",
4
4
  "description": "EIP-5719 client implementation",
5
5
  "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/replacer",
6
6
  "source": "src/index.ts",
@@ -9,8 +9,8 @@
9
9
  "author": "Horizon Blockchain Games",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
- "@0xsequence/abi": "0.0.0-20240402220106",
13
- "@0xsequence/core": "0.0.0-20240402220106"
12
+ "@0xsequence/abi": "0.0.0-20240408185635",
13
+ "@0xsequence/core": "0.0.0-20240408185635"
14
14
  },
15
15
  "peerDependencies": {
16
16
  "ethers": "corbanbrook/ethers.js"
package/src/index.ts CHANGED
@@ -94,7 +94,7 @@ export async function runByEIP5719(
94
94
  const altUri = await tryAwait(eip5719Contract(address, provider).getAlternativeSignature(digest) as Promise<string>)
95
95
  if (!altUri || altUri === '') throw new Error('EIP5719 - Invalid signature and no alternative signature')
96
96
 
97
- const altSignature = ethers.toBeHex(await (solver || new URISolverIPFS()).resolve(altUri))
97
+ const altSignature = ethers.hexlify(await (solver || new URISolverIPFS()).resolve(altUri))
98
98
  if (!altSignature || altSignature === '') throw new Error('EIP5719 - Empty alternative signature')
99
99
  if (altSignature === ethers.hexlify(signature)) {
100
100
  throw new Error('EIP5719 - Alternative signature is invalid or the same')