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

fix/wallet_switchStarknetChain RPC Message #1434

Merged
merged 21 commits into from
Dec 30, 2022

Conversation

dhruvkelawala
Copy link
Contributor

No description provided.

@dhruvkelawala dhruvkelawala marked this pull request as draft November 15, 2022 11:49
@dhruvkelawala dhruvkelawala force-pushed the BLO-546-wallet-switch-starknet-chain-doesnt-work branch from dcded08 to 72e6cb2 Compare November 21, 2022 15:12
@dhruvkelawala dhruvkelawala marked this pull request as ready for review November 21, 2022 19:13
@janek26 janek26 marked this pull request as draft November 24, 2022 11:29
@dhruvkelawala
Copy link
Contributor Author

dhruvkelawala commented Nov 24, 2022

TODO

  • Fix NetworkSwitcher
  • Remove Console Logs
  • Test thoroughly

data: { actionHash, selectedAccount },
}
} catch (error) {
console.error(error)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be removed?

@dhruvkelawala dhruvkelawala marked this pull request as ready for review December 13, 2022 16:24
)
}

const accountsOnNetwork = await getAccounts(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dhruvkelawala was wondering, does it makes sense to reject if there are no accounts?
couldn't the user create it after switching to the custom network?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This RPC message will be sent by dApp to ArgentX and not the user. For example, if a dApp wants to use TESTNET2 instead of TESTNET, it will send this message through window object. And when switching the network, the dApp will require an account to connect with. So if the account is not present, dApp cannot connect to anything and even ArgentX won't be able to maintain a state where no account is selected on a network. If a user wants to create an account on network, they can still do it directly from extension. This PR doesn't change that.

@dhruvkelawala
Copy link
Contributor Author

@janek26 Waiting for your review on this

@janek26 janek26 merged commit 322d81a into develop Dec 30, 2022
@janek26 janek26 deleted the BLO-546-wallet-switch-starknet-chain-doesnt-work branch December 30, 2022 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants