Skip to content

Commit

Permalink
fix: fix the pool errors and get the tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Aug 19, 2024
1 parent fc6d792 commit fb050c6
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 23 deletions.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ repositories {
dependencies {
implementation project(':expo-modules-core')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
implementation "org.xmtp:android:0.15.2"
implementation "org.xmtp:android:0.15.3"
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'com.facebook.react:react-native:0.71.3'
implementation "com.daveanthonythomas.moshipack:moshipack:1.0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ class GroupWrapper {
"clientAddress" to client.address,
"id" to group.id,
"createdAt" to group.createdAt.time,
"peerInboxIds" to group.peerInboxIds(),
// "members" to group.members().map { MemberWrapper.encode(it) },
"version" to "GROUP",
"topic" to group.topic,
"creatorInboxId" to group.creatorInboxId(),
"isActive" to group.isActive(),
"addedByInboxId" to group.addedByInboxId(),
"name" to group.name,
"imageUrlSquare" to group.imageUrlSquare,
"description" to group.description
Expand Down
16 changes: 8 additions & 8 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ PODS:
- hermes-engine/Pre-built (= 0.71.14)
- hermes-engine/Pre-built (0.71.14)
- libevent (2.1.12)
- LibXMTP (0.5.7-beta0)
- LibXMTP (0.5.7-beta3)
- Logging (1.0.0)
- MessagePacker (0.4.7)
- MMKV (1.3.9):
Expand Down Expand Up @@ -449,16 +449,16 @@ PODS:
- GenericJSON (~> 2.0)
- Logging (~> 1.0.0)
- secp256k1.swift (~> 0.1)
- XMTP (0.14.1):
- XMTP (0.14.6):
- Connect-Swift (= 0.12.0)
- GzipSwift
- LibXMTP (= 0.5.7-beta0)
- LibXMTP (= 0.5.7-beta3)
- web3.swift
- XMTPReactNative (0.1.0):
- ExpoModulesCore
- MessagePacker
- secp256k1.swift
- XMTP (= 0.14.1)
- XMTP (= 0.14.6)
- Yoga (1.14.0)

DEPENDENCIES:
Expand Down Expand Up @@ -711,7 +711,7 @@ SPEC CHECKSUMS:
GzipSwift: 893f3e48e597a1a4f62fafcb6514220fcf8287fa
hermes-engine: d7cc127932c89c53374452d6f93473f1970d8e88
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
LibXMTP: d80a1a7c9c748fba81d80b95c62fd075a89224a2
LibXMTP: b6b930f9d2394a560d7f83b02be6ccd789472422
Logging: 9ef4ecb546ad3169398d5a723bc9bea1c46bef26
MessagePacker: ab2fe250e86ea7aedd1a9ee47a37083edd41fd02
MMKV: 817ba1eea17421547e01e087285606eb270a8dcb
Expand Down Expand Up @@ -763,10 +763,10 @@ SPEC CHECKSUMS:
secp256k1.swift: a7e7a214f6db6ce5db32cc6b2b45e5c4dd633634
SwiftProtobuf: 407a385e97fd206c4fbe880cc84123989167e0d1
web3.swift: 2263d1e12e121b2c42ffb63a5a7beb1acaf33959
XMTP: 593cf8bf4e9dc0737a6efc90a0e51fe7602101fd
XMTPReactNative: 1ca02155e4583791c8c99a244206ecf8e057abd2
XMTP: 0f36b44b3922a5933e3487bf09671655e05dcb8d
XMTPReactNative: 71910c6588e526d85583c1f7aeb6c83816747aea
Yoga: e71803b4c1fff832ccf9b92541e00f9b873119b9

PODFILE CHECKSUM: 0e6fe50018f34e575d38dc6a1fdf1f99c9596cdd
PODFILE CHECKSUM: 95d6ace79946933ecf80684613842ee553dd76a2

COCOAPODS: 1.15.2
1 change: 1 addition & 0 deletions ios/Wrappers/GroupWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ struct GroupWrapper {
"topic": group.topic,
"creatorInboxId": try group.creatorInboxId(),
"isActive": try group.isActive(),
"addedByInboxId": try group.addedByInboxId(),
"name": try group.groupName(),
"imageUrlSquare": try group.groupImageUrlSquare(),
"description": try group.groupDescription()
Expand Down
2 changes: 1 addition & 1 deletion ios/XMTPReactNative.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ Pod::Spec.new do |s|
s.source_files = "**/*.{h,m,swift}"
s.dependency 'secp256k1.swift'
s.dependency "MessagePacker"
s.dependency "XMTP", "= 0.14.5"
s.dependency "XMTP", "= 0.14.6"
end
18 changes: 6 additions & 12 deletions src/lib/Group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ export type PermissionUpdateOption = 'allow' | 'deny' | 'admin' | 'super_admin'
export interface GroupParams {
id: string
createdAt: number
peerInboxIds: InboxId[]
// members: Member[]
creatorInboxId: InboxId
topic: string
name: string
isActive: boolean
addedByInboxId: InboxId
imageUrlSquare: string
description: string
}
Expand All @@ -34,12 +35,13 @@ export class Group<
client: XMTP.Client<ContentTypes>
id: string
createdAt: number
peerInboxIds: InboxId[]
// members: Member[]
version = ConversationVersion.GROUP
topic: string
creatorInboxId: InboxId
name: string
isGroupActive: boolean
addedByInboxId: InboxId
imageUrlSquare: string
description: string
// pinnedFrameUrl: string
Expand All @@ -48,11 +50,12 @@ export class Group<
this.client = client
this.id = params.id
this.createdAt = params.createdAt
this.peerInboxIds = params.peerInboxIds
// this.members = params.members
this.topic = params.topic
this.creatorInboxId = params.creatorInboxId
this.name = params.name
this.isGroupActive = params.isActive
this.addedByInboxId = params.addedByInboxId
this.imageUrlSquare = params.imageUrlSquare
this.description = params.description
// this.pinnedFrameUrl = params.pinnedFrameUrl
Expand Down Expand Up @@ -373,15 +376,6 @@ export class Group<
return XMTP.isGroupActive(this.client.inboxId, this.id)
}

/**
* Returns the inbox id that added you to the group.
* To get the latest added by inbox id from the network, call sync() first.
* @returns {Promise<string>} A Promise that resolves to the inbox id that added you to the group.
*/
async addedByInboxId(): Promise<InboxId> {
return XMTP.addedByInboxId(this.client.inboxId, this.id)
}

/**
*
* @param inboxId
Expand Down

0 comments on commit fb050c6

Please sign in to comment.