Skip to content

Commit

Permalink
integrate user interface
Browse files Browse the repository at this point in the history
  • Loading branch information
H34D committed Feb 13, 2023
1 parent 0ec4d5e commit a0cacfc
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
40 changes: 20 additions & 20 deletions src/interface/session.ts
Expand Up @@ -15,31 +15,31 @@ export interface ISession {
};
}

export interface CheckSignatureResult {
export interface User {
id: string;
availableRoles: string[];
productsOfInterest: string[];
activeRole: string;
availableRoles?: string[];
productsOfInterest?: string[];
activeRole?: string;
firstName: string;
lastName: string;
email: string;
emailVerified: boolean;
lastLoginDate: string;
countryId: string;
country: {
bankApproved: boolean;
phoneCode: string;
iso2: string;
iso3: string;
abbreviation: string;
name: string;
version: number;
emailVerified?: boolean;
lastLoginDate?: string;
countryId?: string;
country?: {
bankApproved?: boolean;
phoneCode?: string;
iso2?: string;
iso3?: string;
abbreviation?: string;
name?: string;
version?: number;
};
dateOfBirth: string;
phone: string;
pngmeId: string;
pngmePermsAllowed: boolean;
dataFarmingAllowed: boolean;
dateOfBirth?: string;
phone?: string;
pngmeId?: string;
pngmePermsAllowed?: boolean;
dataFarmingAllowed?: boolean;
}

export interface GetChallengeResult {
Expand Down
6 changes: 3 additions & 3 deletions src/utils/clients/masa-client.ts
@@ -1,6 +1,5 @@
import axios, { AxiosError, AxiosInstance } from "axios";
import {
CheckSignatureResult,
GenerateCreditScoreResult,
GenerateGreenResult,
GetChallengeResult,
Expand All @@ -11,6 +10,7 @@ import {
LogoutResult,
SoulNameMetadataStoreResult,
UpdateCreditScoreResult,
User,
VerifyGreenResult,
} from "../../interface";

Expand Down Expand Up @@ -68,11 +68,11 @@ export class MasaClient {
address: string,
signature: string,
cookie?: string
): Promise<CheckSignatureResult | undefined> => {
): Promise<User | undefined> => {
const cookieToUse = cookie || this.cookie;

const checkSignatureResponse = await this._middlewareClient
.post<CheckSignatureResult>(
.post<User>(
`/session/check-signature`,
{
address,
Expand Down

0 comments on commit a0cacfc

Please sign in to comment.