apibara / starknet-react

A collection of React providers and hooks for StarkNet
https://starknet-react.com
MIT License
364 stars 141 forks source link

feat: wallet connection using starknet v6 #432

Closed J4ckyLIM closed 4 months ago

J4ckyLIM commented 5 months ago

Update InjectedConnector class to work with starknet.js V6:

/!\ temporary solution due to StarknetWindowObject not being correctly typed. Most of the properties are missing yet those properties does exist in the window object meaning they are here but typescript prevent us from accessing it.

In order to have this properly made we need to wait for starknet-types to be updated with a stable version.

/!\ On top of that StarknetWindowObject does have the property account filled only when we do the whole process of connection with a wallet, otherwise it's not persisted, most possibly due to the library itself being unstable.

fracek commented 4 months ago

Looks good! Thank you for this!