Skip to content

Commit

Permalink
fix: merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammeds1992 committed Aug 18, 2023
2 parents b5919eb + 5618520 commit 93e3106
Show file tree
Hide file tree
Showing 5 changed files with 2,608 additions and 2,559 deletions.
1 change: 1 addition & 0 deletions packages/restapi/src/lib/chat/helpers/payloadHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ export const groupDtoToSpaceDto = (groupDto: GroupDTO): SpaceDTO => {
scheduleAt: groupDto.scheduleAt,
scheduleEnd: groupDto.scheduleEnd,
status: groupDto.status ?? null,
meta: groupDto.meta
};

if (groupDto.rules) {
Expand Down
2 changes: 2 additions & 0 deletions packages/restapi/src/lib/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ export interface GroupDTO {
groupType?: string;
status?: ChatStatus | null;
rules?: Rules | null;
meta?: string | null;
}

export interface SpaceDTO {
Expand Down Expand Up @@ -411,6 +412,7 @@ export interface SpaceDTO {
status: ChatStatus | null;
inviteeDetails?: { [key: string]: SPACE_INVITE_ROLES };
rules?: SpaceRules | null;
meta?: string | null;
}

export interface Peer {
Expand Down
10 changes: 8 additions & 2 deletions packages/restapi/src/lib/user/createUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ export type CreateUserProps = {
progressHook?: (progress: ProgressHookType) => void;
};

export const create = async (options: CreateUserProps): Promise<IUser> => {
interface ICreateUser extends IUser {
decryptedPrivateKey?: string;
}
export const create = async (
options: CreateUserProps
): Promise<ICreateUser> => {
const passPrefix = '$0Pc'; //password prefix to ensure password validation
const {
env = Constants.ENV.PROD,
Expand Down Expand Up @@ -117,10 +122,11 @@ export const create = async (options: CreateUserProps): Promise<IUser> => {
encryptedPrivateKey: JSON.stringify(encryptedPrivateKey),
env,
};
const createdUser = await createUserService(body);
const createdUser: ICreateUser = await createUserService(body);

// Report Progress
progressHook?.(PROGRESSHOOK['PUSH-CREATE-05'] as ProgressHookType);
createdUser.decryptedPrivateKey = keyPairs.privateKeyArmored;
return createdUser;
} catch (err) {
// Report Progress
Expand Down
2 changes: 1 addition & 1 deletion packages/restapi/tests/lib/chat/send.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {

chai.use(chaiAsPromised);
const _env = Constants.ENV.DEV;
describe.only('PushAPI.chat.send', () => {
describe('PushAPI.chat.send', () => {
const provider = ethers.getDefaultProvider(5);
let _signer1: any;
let walletAddress1: string;
Expand Down
Loading

0 comments on commit 93e3106

Please sign in to comment.