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

[bug] modal's view type declaration does not include 'Swap' #3395

Open
jackleeio opened this issue Dec 5, 2024 · 2 comments
Open

[bug] modal's view type declaration does not include 'Swap' #3395

jackleeio opened this issue Dec 5, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@jackleeio
Copy link

Link to minimal reproducible example

https://github.com/reown-com/appkit/blob/main/packages/appkit/src/library/react/index.ts

Summary

When I declare this function

const handleSwap = async () => {
    await open({
        view: 'Swap',
    });
};

There is a type error:

Type '"Swap"' is not assignable to type '"Account" | "Connect" | "Networks" | "ApproveTransaction" | "OnRampProviders"'.ts(23

But the document shows that 'Swap' can be used.

Parameters

You can also select the modal's view when calling the open function

open({ view: 'Account' })

List of views you can select

Variable Description
Connect Principal view of the modal - default view when disconnected
Account User profile - default view when connected
AllWallets Shows the list of all available wallets
Networks List of available networks - you can select and target a specific network before connecting
WhatIsANetwork "What is a network" onboarding view
WhatIsAWallet "What is a wallet" onboarding view
OnRampProviders "On-Ramp main view
Swap "Swap main view

List of related npm package versions

"@reown/appkit": "^1.5.3",
"@reown/appkit-adapter-wagmi": "^1.5.3",

Node.js Version

v20.14.0

Package Manager

pnpm@8.15.4

@jackleeio jackleeio added bug Something isn't working needs review labels Dec 5, 2024
@arein
Copy link
Contributor

arein commented Dec 11, 2024

@jackleeio sounds like this is a feature request? You want to be able to open the swap view? View did you declare as bug?

Either way - assigning to @Sam-Newman for prioritization

@rtomas
Copy link
Contributor

rtomas commented Dec 11, 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

3 participants