diff --git a/packages/restapi/src/lib/channels/index.ts b/packages/restapi/src/lib/channels/index.ts index 8728fc02a..75f186399 100644 --- a/packages/restapi/src/lib/channels/index.ts +++ b/packages/restapi/src/lib/channels/index.ts @@ -9,4 +9,6 @@ export * from './subscribe'; export * from './subscribeV2'; export * from './unsubscribe'; export * from './unsubscribeV2'; +export {subscribeV3} from "./subscribeV3"; +export {unsubscribeV3} from "./unsubscribeV3"; diff --git a/packages/restapi/src/lib/channels/subscribeV3.ts b/packages/restapi/src/lib/channels/subscribeV3.ts index cb40cfa8f..1b545a27d 100644 --- a/packages/restapi/src/lib/channels/subscribeV3.ts +++ b/packages/restapi/src/lib/channels/subscribeV3.ts @@ -20,7 +20,7 @@ export type SubscribeOptionsV2Type = { onError?: (err: Error) => void; }; -export const subscribeV2 = async (options: SubscribeOptionsV2Type) => { +export const subscribeV3 = async (options: SubscribeOptionsV2Type) => { const { signer, channelAddress, diff --git a/packages/restapi/src/lib/channels/unsubscribeV3.ts b/packages/restapi/src/lib/channels/unsubscribeV3.ts index caf12b8e2..f0c639ee9 100644 --- a/packages/restapi/src/lib/channels/unsubscribeV3.ts +++ b/packages/restapi/src/lib/channels/unsubscribeV3.ts @@ -18,7 +18,7 @@ export type UnSubscribeOptionsV2Type = { onError?: (err: Error) => void; }; -export const unsubscribeV2 = async (options: UnSubscribeOptionsV2Type) => { +export const unsubscribeV3 = async (options: UnSubscribeOptionsV2Type) => { const { signer, channelAddress, diff --git a/packages/restapi/src/lib/pushNotification/notification.ts b/packages/restapi/src/lib/pushNotification/notification.ts index 896ba3ee7..bffaf6245 100644 --- a/packages/restapi/src/lib/pushNotification/notification.ts +++ b/packages/restapi/src/lib/pushNotification/notification.ts @@ -167,7 +167,7 @@ export class Notification extends PushNotificationBaseClass { ); // convert the setting to minimal version const minimalSetting = this.getMinimalUserSetting(settings!); - return await PUSH_CHANNEL.subscribeV2({ + return await PUSH_CHANNEL.subscribeV3({ signer: this.signer!, channelAddress: channel, userAddress: userAddressInCaip, @@ -218,7 +218,7 @@ export class Notification extends PushNotificationBaseClass { this.account!, parseInt(caipDetail?.networkId as string) ); - return await PUSH_CHANNEL.unsubscribeV2({ + return await PUSH_CHANNEL.unsubscribeV3({ signer: this.signer!, channelAddress: channel, userAddress: userAddressInCaip,