diff --git a/example/src/tests/clientTests.ts b/example/src/tests/clientTests.ts index 3c16c80b..b05405f9 100644 --- a/example/src/tests/clientTests.ts +++ b/example/src/tests/clientTests.ts @@ -39,11 +39,16 @@ test('static can message', async () => { const addressMap = await Client.canMessage('local', [ alix.address, - 'RANDOM', + '0x4E9ce36E442e55EcD9025B9a6E0D88485d628A67', bo.address, ]) - assert(addressMap['RANDOM'] === false, `should not be able to message RANDOM`) + assert( + addressMap[ + '0x4E9ce36E442e55EcD9025B9a6E0D88485d628A67'.toLocaleLowerCase() + ] === false, + `should not be able to message 0x4E9ce36E442e55EcD9025B9a6E0D88485d628A67` + ) assert( addressMap[alix.address.toLowerCase()] === true, diff --git a/example/src/tests/groupTests.ts b/example/src/tests/groupTests.ts index d1da8aa0..6b24e1d4 100644 --- a/example/src/tests/groupTests.ts +++ b/example/src/tests/groupTests.ts @@ -866,12 +866,12 @@ test('canMessage', async () => { const canMessageV3 = await caro.canMessage([ caro.address, alix.address, - 'RANDOM', + '0x4E9ce36E442e55EcD9025B9a6E0D88485d628A67', ]) assert( - canMessageV3['RANDOM'] === false, - `should not be able to message RANDOM` + canMessageV3['0x4E9ce36E442e55EcD9025B9a6E0D88485d628A67'] === false, + `should not be able to message 0x4E9ce36E442e55EcD9025B9a6E0D88485d628A67` ) assert( diff --git a/ios/XMTPReactNative.podspec b/ios/XMTPReactNative.podspec index 939babfa..4756572c 100644 --- a/ios/XMTPReactNative.podspec +++ b/ios/XMTPReactNative.podspec @@ -26,7 +26,7 @@ Pod::Spec.new do |s| s.source_files = "**/*.{h,m,swift}" s.dependency "MessagePacker" - s.dependency "XMTP", "= 3.0.13" + s.dependency "XMTP", "= 3.0.14" s.dependency 'CSecp256k1', '~> 0.2' s.dependency "SQLCipher", "= 4.5.7" end diff --git a/src/index.ts b/src/index.ts index 8d410b89..00f467e1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -284,7 +284,7 @@ export async function staticCanMessage( environment: XMTPEnvironment, peerAddresses: Address[] ): Promise<{ [key: Address]: boolean }> { - return await XMTPModule.canMessage(environment, peerAddresses) + return await XMTPModule.staticCanMessage(environment, peerAddresses) } export async function getOrCreateInboxId( diff --git a/src/lib/Client.ts b/src/lib/Client.ts index fbbaafb9..eaf6492d 100644 --- a/src/lib/Client.ts +++ b/src/lib/Client.ts @@ -292,7 +292,6 @@ export class Client< return await XMTPModule.getOrCreateInboxId(address, env) } - /** * Determines whether the current user can send messages to the specified peers. * @@ -302,7 +301,10 @@ export class Client< * @param {XMTPEnvironment} env - Environment to see if the address is on the network for * @returns {Promise<{ [key: Address]: boolean }>} A Promise resolving to a hash of addresses and booleans if they can message on the network. */ - static async canMessage(env: XMTPEnvironment, addresses: Address[]): Promise<{ [key: Address]: boolean }> { + static async canMessage( + env: XMTPEnvironment, + addresses: Address[] + ): Promise<{ [key: Address]: boolean }> { return await XMTPModule.staticCanMessage(env, addresses) }