Skip to content

Commit

Permalink
Add generic error and statement (#37)
Browse files Browse the repository at this point in the history
Also update
  • Loading branch information
andy-t-wang authored May 30, 2024
1 parent 694a847 commit 726a21a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions demo/with-next/components/ClientContent/WalletAuth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ export const WalletAuth = () => {
requestId: "0",
expirationTime: new Date(new Date().getTime() + 7 * 24 * 60 * 60 * 1000),
notBefore: new Date(new Date().getTime() - 24 * 60 * 60 * 1000),
statement:
"This is my statement and here is a link https://worldcoin.com/apps",
});

if (!generateMessageResult) {
Expand Down
2 changes: 2 additions & 0 deletions src/types/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export enum WalletAuthErrorCodes {
InvalidAddress = "invalid_address",
MalformedRequest = "malformed_request",
UserRejected = "user_rejected",
GenericError = "generic_error",
}

export const WalletAuthErrorMessage = {
Expand All @@ -60,6 +61,7 @@ export const WalletAuthErrorMessage = {
[WalletAuthErrorCodes.MalformedRequest]:
"Provided parameters in the request are invalid.",
[WalletAuthErrorCodes.UserRejected]: "User rejected the request.",
[WalletAuthErrorCodes.GenericError]: "Something unexpected went wrong.",
};

export enum MiniKitInstallErrorCode {
Expand Down

0 comments on commit 726a21a

Please sign in to comment.