Skip to content

Commit e8cbccd

Browse files
committed
Rename buildEIP6492Signature
1 parent fc97408 commit e8cbccd

File tree

4 files changed

+5
-17
lines changed

4 files changed

+5
-17
lines changed

packages/passkeys/src/index.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -258,19 +258,7 @@ export class SequencePasskeySigner implements signers.SapientSigner {
258258
return signatureBytes
259259
}
260260

261-
async buildValidationSignature(signatureBytes: string): Promise<string | undefined> {
262-
console.log('passkey buildValidationSignature', signatureBytes)
263-
try {
264-
if (await this.isDeployed()) {
265-
return undefined
266-
}
267-
} catch (e) {
268-
// Ignore. Assume not deployed
269-
}
270-
return this.buildEIP6492Signature(signatureBytes)
271-
}
272-
273-
private async buildEIP6492Signature(signature: string): Promise<string> {
261+
async buildEIP6492Signature(signature: string): Promise<string> {
274262
const deployTransactions = await this.buildDeployTransaction()
275263
if (!deployTransactions || deployTransactions?.transactions.length === 0) {
276264
throw new Error('Cannot build EIP-6492 signature without deploy transaction')

packages/signhub/src/orchestrator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ export class Orchestrator {
186186
.then(async signature => {
187187
const suffix = s.suffix()
188188
let validationSignature
189-
if (s.buildValidationSignature) {
189+
if (s.buildEIP6492Signature) {
190190
try {
191-
validationSignature = await s.buildValidationSignature(signature)
191+
validationSignature = await s.buildEIP6492Signature(signature)
192192
} catch (e) {
193193
// Log and ignore
194194
console.warn(`signer ${saddr} failed to build validation signature: ${e}`)

packages/signhub/src/signers/signer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export interface SapientSigner {
2828
/**
2929
* Build a validation signature for an undeployed contract signer.
3030
*/
31-
buildValidationSignature?(signatureBytes: ethers.BytesLike): Promise<ethers.BytesLike | undefined>;
31+
buildEIP6492Signature?(signature: ethers.BytesLike): Promise<ethers.BytesLike | undefined>;
3232

3333
/**
3434
* Notify the signer of a status change.

packages/signhub/tests/orchestrator.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ describe('Orchestrator', () => {
100100
suffix(): ethers.BytesLike {
101101
return new Uint8Array([2])
102102
}
103-
async buildValidationSignature(signature: string) {
103+
async buildEIP6492Signature(signature: string) {
104104
return signature + 'validation'
105105
}
106106
}

0 commit comments

Comments
 (0)