mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
Improved signature helper using fallback non-personal sign method.
This commit is contained in:
parent
51aa0fbf64
commit
4f28092014
@ -7,8 +7,15 @@ export async function signText(text: string, publicKey: string, password?: strin
|
||||
try {
|
||||
return await web3.eth.personal.sign(text, publicKey, password)
|
||||
} catch (e) {
|
||||
Logger.error("Error on personal sign.")
|
||||
Logger.error(e)
|
||||
throw new Error("Error executing personal sign")
|
||||
try {
|
||||
return await web3.eth.sign(text, publicKey, password)
|
||||
} catch(e2) {
|
||||
Logger.error("Error on sign.")
|
||||
Logger.error(e2)
|
||||
throw new Error("Error executing personal sign")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user