Skip to content

Commit

Permalink
fix: server number overflow (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabin54 authored Apr 14, 2023
1 parent d8ad8c6 commit ef150d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/sismo-connect-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sismo-core/sismo-connect-server",
"version": "0.0.7",
"version": "0.0.8",
"description": "sismoConnect server package",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Provider } from "@ethersproject/abstract-provider";
import { BigNumber } from "@ethersproject/bignumber";
import { encodeRequestIdentifier } from "./utils/encodeRequestIdentifier";
import { encodeAccountsTreeValue } from "./utils/encodeAccountsTreeValue";
import { AuthType, ClaimType, VerifiedAuth, VerifiedClaim, SismoConnectProof } from "../common-types";
import { AuthType, ClaimType, VerifiedAuth, VerifiedClaim, SismoConnectProof, resolveSismoIdentifier } from "../common-types";
import { ethers } from "ethers";
import { keccak256 } from "ethers/lib/utils";
import { decodeProofData } from './utils/proofData';
Expand Down Expand Up @@ -183,12 +183,7 @@ export class HydraS2Verifier {
//userId is the destination
userId = snarkProof.input[0];
userId = BigNumber.from(userId).toHexString();
if (auth.authType !== AuthType.EVM_ACCOUNT) {
//Remove account indicator E.g for github 0x0001 and twitter 0x0002
userId = userId.substring(6);
userId = BigNumber.from(userId).toNumber();
userId = userId.toString();
}
userId = resolveSismoIdentifier(userId, auth.authType);
}

return {
Expand Down

0 comments on commit ef150d9

Please sign in to comment.