Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update starknet dependency version to 5.9.1 #253

Closed
rjnrohit opened this issue May 31, 2023 · 3 comments
Closed

update starknet dependency version to 5.9.1 #253

rjnrohit opened this issue May 31, 2023 · 3 comments
Labels
Difficulty: intermediate mobilise some notions about the field, but can be learned while doing Duration: few days State: open Type: bug Fix a bug Type: refactor Refactor existing code

Comments

@rjnrohit
Copy link

No description provided.

@fracek fracek added Type: bug Fix a bug Difficulty: intermediate mobilise some notions about the field, but can be learned while doing Type: refactor Refactor existing code Duration: few days State: open labels May 31, 2023
@fracek
Copy link
Contributor

fracek commented May 31, 2023

I agree with this. From our discussion on telegram my understanding is the following:

  • get-starknet and wallets return an object that implements the AccountInterface v4
  • starknet.js requires now the AccountInterface v5

My idea is that for the time being we should wrap the account v4 into a shim that implements the account v5 interface (and throws if the library/dev tries to use a new method).

What do you think?

@fracek
Copy link
Contributor

fracek commented May 31, 2023

I looked more into this tonight.

  • Most changes are caused by library.chainId becoming await library.getChainId(). We can wrap this into a hook so the change is simple.
  • get-starknet-core has starknet as a peer dependency. This is what seems to be causing issues.

At the moment and for the next few weeks, all injected wallets will still implement the account interface from v4.
So the only way I see adding support for v5 is by:

  1. explicitly request a v4 account interface to the wallet
  2. wrap the v4 account into a shim that implements the v5 interface
  3. use the shim as the starknet-react provider

in a few weeks/months once v4 is officially deprecated, we can start requesting v5 and discard the shim.

What do you think?

@fracek
Copy link
Contributor

fracek commented Nov 13, 2023

v5 is now supported.

@fracek fracek closed this as completed Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: intermediate mobilise some notions about the field, but can be learned while doing Duration: few days State: open Type: bug Fix a bug Type: refactor Refactor existing code
Projects
None yet
Development

No branches or pull requests

2 participants