connectkit icon indicating copy to clipboard operation
connectkit copied to clipboard

[BUG] useSIWE() hook return union-typed as any

Open volkyeth opened this issue 1 year ago • 3 comments

The useSIWE() hook return is union-typed as any: https://github.com/family/connectkit/blob/825f95e8f6bd9fae16803a63efaa14b87137a793/packages/connectkit/src/siwe/useSIWE.ts#L28

That kills all type inference when using it

volkyeth avatar Oct 12 '23 12:10 volkyeth

Running into the same issue, tying is completely bricked for useSIWE() hook.

https://github.com/family/connectkit/blame/main/packages/connectkit/src/siwe/useSIWE.ts#L28C7-L28C7

Ping @lochie

CleanShot 2023-11-22 at 15 54 38@2x

ian-os avatar Nov 22 '23 21:11 ian-os

Created PR fix: https://github.com/family/connectkit/pull/322

@lochie @volkyeth

ian-os avatar Nov 22 '23 21:11 ian-os

@ian-os changing the return types breaks a few other places. I have a fix for those as well in #317

alex-grover avatar Nov 22 '23 22:11 alex-grover