3

I am switching my app from wallet-adapter to wallet-standard. Based on my reading, the wallets that support wallet-standard will be automatically detected.

So I pass an empty array to the wallets props (probably should become an optional prop in the future):

import {
  ConnectionProvider,
  WalletProvider,
} from "@solana/wallet-adapter-react";
import { WalletModalProvider } from "@solana/wallet-adapter-react-ui";

<ConnectionProvider ...>
  <WalletProvider wallets={[]}>
    <WalletModalProvider>
      ...
    </WalletModalProvider>
  </WalletProvider>
</ConnectionProvider>

According to this tweet, a few wallets already support the wallet standard. I have the latest version of all their extensions installed in my browser (up-to-date Brave).

However, when I click to connect the wallet, only Backpack is detected. The others seem to only get detected if I add their adapters back in.

I am not sure if I am missing any additional configuration. I have noticed there are other packages, such as @wallet-standard/app or @wallet-standard/react but not sure how they figure into this. I have seen this example in wallet-standard repo as well but I am not sure how it can be used in conjunction with @solana/wallet-adapter-react-ui. (And inexplicably, it seems to be still using the wallet adapters.)

2 Answers 2

7

Hi Sohrab :) If you're using @solana/wallet-adapter-react, there isn't really anything explicit you need to do to support the Wallet Standard. It's built in now, along with support for Mobile Wallet Adapter.

You don't need to use the @wallet-standard/* or @solana/wallet-standard-* packages directly, at least not for now. In the future, the @wallet-standard/react package will likely do some of what @solana/wallet-adapter-react does now, and provide a way to access the full functionality of Standard Wallets.

As for wallets, Backpack, Glow, Phantom, and a few other wallets have Wallet Standard support in production. Brave and a few others have it in development or alpha releases. The Wallet Standard is able to work alongside Wallet Adapter.

I recommend continuing to include adapters for popular wallets like Phantom, Solflare, and any others. As more wallets support the Wallet Standard, you can gradually drop these adapters. There's a warning shown in the console log if an adapter duplicates a Standard Wallet that is detected.

I also recommend continuing to include the Phantom and Solflare adapters on iOS even after they add Wallet Standard support, because these take advantage of deep linking features in those wallets. This can't be done with the Wallet Standard alone.

1
  • @sohrab if this answered your question, please mark it :)
    – Jordan
    Commented Feb 4, 2023 at 2:40
1

does this answer your question? i think brave and phantom just havent enabled support yet, only backpack is showing up for me as well. "Support for Mobile Wallet Adapter (MWA) and the Wallet Standard has been added directly into Wallet Adapter." https://github.com/solana-labs/wallet-adapter/blob/master/WALLET.md enter image description here

2
  • here's a tweet thread about this: twitter.com/bfriel_/status/1604641584972107778
    – viksit
    Commented Jan 18, 2023 at 22:10
  • Thanks for that. I have seen similar behaviour now. But I still don't know what the point of @wallet-standard/* stuff is. Are we meant to be using those if it's a new app?
    – sohrab
    Commented Jan 20, 2023 at 10:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.