Skip to content

Commit

Permalink
fix: Merge branch 'main' into deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammeds1992 committed Jan 9, 2024
2 parents a5bc149 + 5ce3dfc commit 5d76487
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/restapi/src/lib/pushstream/PushStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export class PushStream extends EventEmitter {
if (shouldInitializeChatSocket) {
if (!this.pushChatSocket) {
// If pushChatSocket does not exist, create a new socket connection
this.pushChatSocket = createSocketConnection({
this.pushChatSocket = await createSocketConnection({
user: walletToPCAIP10(this.account),
socketType: 'chat',
socketOptions: {
Expand All @@ -183,7 +183,7 @@ export class PushStream extends EventEmitter {
if (shouldInitializeNotifSocket) {
if (!this.pushNotificationSocket) {
// If pushNotificationSocket does not exist, create a new socket connection
this.pushNotificationSocket = createSocketConnection({
this.pushNotificationSocket = await createSocketConnection({
user: pCAIP10ToWallet(this.account),
env: this.options?.env as ENV,
socketOptions: {
Expand Down
4 changes: 2 additions & 2 deletions packages/restapi/src/lib/pushstream/socketClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { API_BASE_URL } from '../config';
import { getCAIPAddress, walletToPCAIP10 } from '../helpers';
import { SocketInputOptions } from './pushStreamTypes';

export function createSocketConnection({
export async function createSocketConnection({
user,
env,
socketType = 'notification',
Expand All @@ -29,7 +29,7 @@ export function createSocketConnection({
const userAddressInCAIP =
socketType === 'chat'
? walletToPCAIP10(user)
: getCAIPAddress(env, user, 'User');
: await getCAIPAddress(env, user, 'User');

const query =
socketType === 'notification'
Expand Down

0 comments on commit 5d76487

Please sign in to comment.