bytesbay / web3-token

Web3 Token is a new way to authenticate users in a hybrid dApps using signed messages. Implementation of EIP-4361.
380 stars 50 forks source link

Why do you await verify? #27

Closed Drarig29 closed 2 years ago

Drarig29 commented 2 years ago

https://github.com/bytesbay/web3-token/blob/a77579931a606f06239b9f06021a8b587f749cd9/src/lib/verify/verify.js#L67

The verify() function isn't a promise but you are using await with it everywhere. Is it a mistake or to be future-proof? Or to be consistent with await sign()?

Because of that I get a warning:

image

'await' has no effect on the type of this expression.

bytesbay commented 2 years ago

mistake