Skip to content

Commit

Permalink
Merge pull request #31 from zCloak-Network/dev
Browse files Browse the repository at this point in the history
feat: update sign result format
  • Loading branch information
tower1229 authored May 8, 2024
2 parents e32bad3 + e20d9b6 commit 950cab4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/app/sign/signer/SignatureResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default function SignatureResultObject(props: {
<TextareaWithCopy
value={signature}
copyValue={`${signature}
---
===
To verify this signature, please paste the entire message to ${
import.meta.env.VITE_APP_CANISTER_HOST
}/#/sign/verifier`}
Expand Down
2 changes: 1 addition & 1 deletion src/app/sign/verifier/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ ${signatureResult.trim()}`;
placeholder={`Please paste the signature here
e.g:
Message
---
===
Powered by Valid One
Signer:signer address,
Signature:signature value`}
Expand Down
4 changes: 2 additions & 2 deletions src/constants/sign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const signatureResultTemplate = (
? `${publicCont}
`
: "") +
`---
Powered by Valid One
`===
Signed at https://valid.one
Signer:${ethereumEncode(`0x${public_key}`)}
Signature:0x${hex}`;
2 changes: 1 addition & 1 deletion src/hooks/useValid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { sha256OfString } from "@/utils";
export function useValid() {
const checkSignatureResult = (signatureResult: string) => {
const data = signatureResult.match(
/^([\w\W]*)\n---\nPowered by Valid One\nSigner:(\w+)\nSignature:(0x\w{130})/
/^([\w\W]*)\n===\nSigned at https:\/\/valid\.one\nSigner:(\w+)\nSignature:(0x\w{130})/
);

if (data?.length !== 4) {
Expand Down

0 comments on commit 950cab4

Please sign in to comment.