Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes some build & type bugs in smart contracts #515

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ios/Wrappers/AuthParamsWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ struct AuthParamsWrapper {
dbDirectory: dbDirectory,
historySyncUrl: historySyncUrl,
isSmartContractWallet: isSmartContractWallet,
chainId: blockNumber != nil ? UInt64(chainId!) : nil,
chainId: chainId != nil ? UInt64(chainId!) : nil,
blockNumber: blockNumber != nil ? UInt64(blockNumber!) : nil
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
return await XMTPModule.receiveSignature(requestID, signature)
}

export async function receiveSCWSignature(requestID: string, signature: string) {

Check warning on line 124 in src/index.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `requestID:·string,·signature:·string` with `⏎··requestID:·string,⏎··signature:·string⏎`
return await XMTPModule.receiveSCWSignature(requestID, signature)
}

Expand Down Expand Up @@ -255,8 +255,8 @@

export async function buildV3(
address: string,
chainId?: number | undefined,
environment: 'local' | 'dev' | 'production',
chainId?: number | undefined,
appVersion?: string | undefined,
enableV3?: boolean | undefined,
dbEncryptionKey?: Uint8Array | undefined,
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@
if (signer.isSmartContractWallet()) {
await XMTPModule.receiveSCWSignature(
request.id,
Buffer.from(signatureString)
signatureString
)
} else {
const eSig = splitSignature(signatureString)
Expand Down Expand Up @@ -412,7 +412,7 @@
})
}

/**

Check warning on line 415 in src/lib/Client.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `··`
* Builds a V3 ONLY instance of the Client class using the provided address and chainId if SCW.
*
* @param {string} address - The address of the account to build
Expand All @@ -438,8 +438,8 @@
}
const client = await XMTPModule.buildV3(
address,
chainId,
options.env,
chainId,
options.appVersion,
Boolean(options.enableV3),
options.dbEncryptionKey,
Expand Down
Loading