Skip to content

Commit

Permalink
Merge pull request #132 from Proof-Of-Humanity/testnets
Browse files Browse the repository at this point in the history
Testnets
  • Loading branch information
martillansky authored Nov 2, 2024
2 parents 8f0ffec + 5717ed2 commit c644db2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/data/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@ import { MeQuery } from "generated/graphql";
// function should be removed
const sanitize = (res: MeQuery[]) => {
res.map((claimer) => {
if (claimer.claimer?.currentRequest && claimer.claimer?.registration)
claimer.claimer.registration = null;
if (claimer.claimer?.currentRequest && claimer.claimer?.registration) {
if (claimer.claimer?.currentRequest.index <= -100) {
claimer.claimer.currentRequest = null;
} else {
claimer.claimer.registration = null;
}
}
});
};

export const getMyData = async (account: string) => {
const res = await Promise.all(
supportedChains.map((chain) => sdk[chain.id].Me({ id: account })),
);

sanitize(res);

const homeChain = supportedChains.find(
Expand Down

0 comments on commit c644db2

Please sign in to comment.