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

accountSelect should throw if rpcUrl is missing in chainValidation (hw-common) #2242

Open
1 task done
kernelwhisperer opened this issue Jun 21, 2024 · 0 comments
Open
1 task done
Assignees
Labels
bug Something isn't working

Comments

@kernelwhisperer
Copy link

Current Behavior

I'm was using onboard without a rpcUrl, worked great except for the Trezor integration:

	chains: [
		{
			id: '0x1', // Chain ID in hexadecimal for Ethereum Mainnet
			token: 'ETH',
			label: 'Ethereum Mainnet'
		},
	]

Trezor is failing silently and no error is thrown:

https://github.com/blocknative/web3-onboard/blob/develop/packages/hw-common/src/account-select.ts#L13
https://github.com/blocknative/web3-onboard/blob/develop/packages/common/src/validation.ts#L5
https://github.com/blocknative/web3-onboard/blob/develop/packages/common/src/validation.ts#L28

Expected Behavior

To throw an error, like the source code suggests.

Steps To Reproduce

No response

What package is effected by this issue?

@web3-onboard/trezor

Is this a build or a runtime issue?

Runtime

Package Version

@web3-onboard/trezor@2.4.6

Node Version

20.2.0

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

Anything else?

I think the validation library 'joi' might have been updated and the return value is different now.

Sanity Check

  • If this is a build issue, I have included my build config. If this is a runtime issue, I have included reproduction steps and/or a Minimal, Reproducible Example.
@kernelwhisperer kernelwhisperer added the bug Something isn't working label Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants