Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot handle external error when signing #12

Open
hoangNguyenAngelhack opened this issue Jul 10, 2024 · 0 comments
Open

Cannot handle external error when signing #12

hoangNguyenAngelhack opened this issue Jul 10, 2024 · 0 comments

Comments

@hoangNguyenAngelhack
Copy link

hoangNguyenAngelhack commented Jul 10, 2024

const sign = async (message: string): Promise => { return new Promise((resolve, reject) => { try { (window as any).unisat .signMessage(message, "bip322-simple") .then((signature: string) => { resolve(signature); }); } catch (e) { reject(e); } }); };`

please change code

const sign = async (message: string): Promise<string> => {
  const signature = await (window as any).unisat.signMessage(
    message,
    "bip322-simple"
  );
  return signature;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant