diff --git a/ios/Wrappers/ConsentWrapper.swift b/ios/Wrappers/ConsentWrapper.swift index b1b273c14..8f083a14f 100644 --- a/ios/Wrappers/ConsentWrapper.swift +++ b/ios/Wrappers/ConsentWrapper.swift @@ -5,7 +5,7 @@ import XMTP struct ConsentWrapper { static func encodeToObj(_ entry: XMTP.ConsentListEntry) throws -> [String: Any] { return [ - "type": entry.entryType, + "type": entry.entryType.rawValue, "value": entry.value, "state": consentStateToString(state: entry.consentType), ] diff --git a/src/index.ts b/src/index.ts index 477126086..d924bf230 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,7 +4,7 @@ import { EventEmitter, NativeModulesProxy } from 'expo-modules-core' import { Client } from '.' import { ConversationContext } from './XMTP.types' import XMTPModule from './XMTPModule' -import { ConsentListEntry } from './lib/ConsentListEntry' +import { ConsentListEntry, ConsentState } from './lib/ConsentListEntry' import { DecryptedLocalAttachment, EncryptedLocalAttachment, @@ -321,7 +321,7 @@ export async function decodeMessage( export async function conversationConsentState( clientAddress: string, conversationTopic: string -): Promise<'allowed' | 'denied' | 'unknown'> { +): Promise { return await XMTPModule.conversationConsentState( clientAddress, conversationTopic diff --git a/src/lib/Contacts.ts b/src/lib/Contacts.ts index 19c4c302f..4738fc6d7 100644 --- a/src/lib/Contacts.ts +++ b/src/lib/Contacts.ts @@ -1,6 +1,6 @@ import { Client } from './Client' -import * as XMTPModule from '../index' import { ConsentListEntry } from './ConsentListEntry' +import * as XMTPModule from '../index' export default class Contacts { client: Client