Skip to content

Conversation

@Agusx1211
Copy link
Member

@Agusx1211 Agusx1211 commented Jun 28, 2023

This removes defaultNetworkId from the wallet request handler, in its place we use the prompter to query this information directly from the wallet webapp. This avoids duplicating this information, something that could lead to sync issues.

@Agusx1211 Agusx1211 requested a review from corbanbrook June 28, 2023 13:59
@Agusx1211
Copy link
Member Author

I also fixed getChainId on the provider. It previously opened wallet webapp and because of that, it returned the wrong value. Now it just returns whatever is defined as default.

}

export interface WalletUserPrompter {
getDefaultChainId(): number
Copy link
Member

Choose a reason for hiding this comment

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

btw, just wondering, why do we need getDefaultChainId() on the prompter? The idea of the prompter interface is that these are methods which require "user input" / "user confirmation", so the UI will actually prompt the user to proceed or decline

@pkieltyka pkieltyka merged commit 8137403 into v2 Jun 28, 2023
@pkieltyka pkieltyka deleted the v2-remove-duplicated-default branch June 28, 2023 20:11
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.

4 participants