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

connect({}) throws runtime error, yet compiles according to type system #2237

Closed
1 task done
bengobeil opened this issue Jun 17, 2024 · 2 comments · Fixed by #2236
Closed
1 task done

connect({}) throws runtime error, yet compiles according to type system #2237

bengobeil opened this issue Jun 17, 2024 · 2 comments · Fixed by #2236
Assignees
Labels
bug Something isn't working

Comments

@bengobeil
Copy link
Contributor

Current Behavior

After upgrading to current version of web3onboard/react, my code fails due to connect({})

Expected Behavior

should not fail since ConnectOptions allows for undefined autoSelect. Getting autoSelect is undefined in index.svelte.

Steps To Reproduce

Call the connect function with {}

What package is effected by this issue?

@web3-onboard/core

Is this a build or a runtime issue?

Runtime

Package Version

2.9.1

Node Version

20.11

What browsers are you seeing the problem on?

Firefox

Relevant log output

TypeError: autoSelect is undefined
    4 Index.svelte:418
    RxJS 14
    instance$4 Index.svelte:415
    init$1 index.mjs:2165
    Index$1 index.2d3ace14.js:216334
    create_if_block_20 index.2d3ace14.js:216795
    p index.2d3ace14.js:218159
    update index.mjs:1347
    flush index.mjs:1307
    promise callback*schedule_update index.mjs:1258
    make_dirty index.mjs:2133
    ctx index.mjs:2171
    instance index.2d3ace14.js:218324
    RxJS 26
    dispatch$1 index.ts:117
    setWalletModules actions.ts:216
    connect$1 connect.ts:30
    connect useConnectWallet.js:12
    walletSelect useWeb3.tsx:165
    React 23
    ["4aBH6"]< index.tsx:95
    newRequire index.2d3ace14.js:71
    <anonymous> index.2d3ace14.js:122
    <anonymous> index.2d3ace14.js:145

Uncaught (in promise) TypeError: ctx[0] is undefined
    create_fragment$4 Index.svelte:580
    init$1 index.mjs:2180
    Index$1 index.2d3ace14.js:216334
    create_if_block_20 index.2d3ace14.js:216795
    p index.2d3ace14.js:218159
    update index.mjs:1347
    flush index.mjs:1307
    promise callback*schedule_update index.mjs:1258
    make_dirty index.mjs:2133
    ctx index.mjs:2171
    instance index.2d3ace14.js:218324
    RxJS 26
    dispatch$1 index.ts:117
    setWalletModules actions.ts:216
    connect$1 connect.ts:30
    connect useConnectWallet.js:12
    walletSelect useWeb3.tsx:165
    React 23
    ["4aBH6"]< index.tsx:95
    newRequire index.2d3ace14.js:71
    <anonymous> index.2d3ace14.js:122
    <anonymous> index.2d3ace14.js:145
Index.svelte:580:6

Anything else?

No response

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.
@Adamj1232
Copy link
Member

@bengobeil please give this a shot with @web3-onboard/react v 2.9.2-alpha.2 should be fixed but would love confirmation on your end prior to release

@bengobeil
Copy link
Contributor Author

yes @Adamj1232 it works, thanks!

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
2 participants