Skip to content

Commit

Permalink
lint fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Dec 2, 2023
1 parent 8f98b40 commit 83bfc85
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion example/src/ConversationScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
} from 'xmtp-react-native-sdk'

import { NavigationParamList } from './Navigation'
import { useXmtp } from './XmtpContext'
import {
useConversation,
useMessage,
Expand All @@ -42,7 +43,6 @@ import {
useLoadRemoteAttachment,
usePrepareRemoteAttachment,
} from './hooks'
import { useXmtp } from './XmtpContext'

type Attachment = {
file?: DocumentPickerAsset
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ export async function canMessage(

export async function staticCanMessage(
peerAddress: string,
environment: "local" | "dev" | "production",
appVersion?: string | undefined,
environment: 'local' | 'dev' | 'production',
appVersion?: string | undefined
): Promise<boolean> {
return await XMTPModule.staticCanMessage(peerAddress, environment, appVersion);
return await XMTPModule.staticCanMessage(peerAddress, environment, appVersion)
}

export async function encryptAttachment(
Expand Down
19 changes: 13 additions & 6 deletions src/lib/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class Client<ContentTypes> {
* @param {Signer} signer - The signer object used for authentication and message signing.
* @param {Partial<ClientOptions>} opts - Optional configuration options for the Client.
* @returns {Promise<Client>} A Promise that resolves to a new Client instance.
*
*
* See {@link https://xmtp.org/docs/build/authentication#create-a-client | XMTP Docs} for more information.
*/
static async create<
Expand Down Expand Up @@ -155,16 +155,23 @@ export class Client<ContentTypes> {

/**
* Static method to determine if the address is currently in our network.
*
*
* This method checks if the specified peer has signed up for XMTP.
*
*
* @param {string} peerAddress - The address of the peer to check for messaging eligibility.
* @param {Partial<ClientOptions>} opts - Optional configuration options for the Client.
* @returns {Promise<boolean>}
*/
static async canMessage(peerAddress: string, opts?: Partial<ClientOptions>): Promise<boolean> {
const options = defaultOptions(opts);
return await XMTPModule.staticCanMessage(peerAddress, options.env, options.appVersion);
static async canMessage(
peerAddress: string,

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

View workflow job for this annotation

GitHub Actions / lint

Delete `·`
opts?: Partial<ClientOptions>
): Promise<boolean> {
const options = defaultOptions(opts)
return await XMTPModule.staticCanMessage(
peerAddress,

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

View workflow job for this annotation

GitHub Actions / lint

Delete `·`
options.env,

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

View workflow job for this annotation

GitHub Actions / lint

Delete `·`
options.appVersion,

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

View workflow job for this annotation

GitHub Actions / lint

Delete `,`
)
}

constructor(
Expand Down

0 comments on commit 83bfc85

Please sign in to comment.