Skip to content

Cannot handle external error when signing #12

@hoangNguyenAngelhack

Description

@hoangNguyenAngelhack

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;
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions