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

Early Access: Mobile Wallet Adapter & Wallet Standard #604

Closed
35 of 53 tasks
steveluscher opened this issue Oct 17, 2022 · 29 comments
Closed
35 of 53 tasks

Early Access: Mobile Wallet Adapter & Wallet Standard #604

steveluscher opened this issue Oct 17, 2022 · 29 comments
Labels
documentation Improvements or additions to documentation

Comments

@steveluscher
Copy link
Collaborator

steveluscher commented Oct 17, 2022

Early Access: Mobile Wallet Adapter & Wallet Standard

Solana Labs is about to release a new version of the React Wallet Adapter that comes with support for the Solana Mobile Stack’s Mobile Wallet Adapter and the new Solana Wallet Standard built in.

Upgrading comes with some benefits that we think you will like:

  • Your app will automatically work with all mobile wallet apps – the first of which will be released before Breakpoint this year.
  • Your app will automatically work with all present and future wallets that support the Wallet Standard.
  • Once the majority of wallets you wish to support have shipped Wallet Standard support, you will be able to reduce code bloat and supply chain attack surface in your app by deleting their legacy wallet adapter plugins.

For much more detail about how the Mobile Wallet Adapter and the Wallet Standard work, refer to this podcast.

Why you might like to participate

Apps that successfully upgrade for Mobile Wallet Adapter and Wallet Standard compatiblity will be demoable with the upcoming Solana Mobile Saga phone on the showroom floor of Breakpoint (Nov 4–7). The Solana Mobile team wants to showcase great user experiences with as many apps as possible, and we want you to be a part of that.

Goal of the early access program

Before we release this to the public and encourage the entire world to upgrade, we want to gather feedback from you. Please help us to find bugs and rough edges in the user experience before we announce this to the world.

Eligibility

If you use any of these packages connect to wallets from your app, you are eligible to upgrade.

  • @solana/wallet-adapter-react
  • @solana/wallet-adapter-react-ui
  • @solana/wallet-adapter-ant-design
  • @solana/wallet-adapter-material-ui

How to upgrade

From the directory where your package.json file is located, run the following commands:

Instructions for yarn

yarn

# If your app uses wallet-adapter-react
yarn upgrade @solana/wallet-adapter-react@latest

# If your app uses wallet-adapter-react-ui
yarn upgrade @solana/wallet-adapter-react-ui@latest

# If your app uses wallet-adapter-ant-design
yarn upgrade @solana/wallet-adapter-ant-design@latest

# If your app uses wallet-adapter-material-ui
yarn upgrade @solana/wallet-adapter-material-ui@latest

Instructions for npm

# If your app uses wallet-adapter-react
npm i --save @solana/wallet-adapter-react@latest

# If your app uses wallet-adapter-react-ui
npm i --save @solana/wallet-adapter-react-ui@latest

# If your app uses wallet-adapter-ant-design
npm i --save @solana/wallet-adapter-ant-design@latest

# If your app uses wallet-adapter-material-ui
npm i --save @solana/wallet-adapter-material-ui@latest

Alternatively, you can manually edit your package.json file to update to those versions, then re-run your package manager's install command.

If your site is locked to a version of @solana/web3.js older than 1.58.0, you may need to upgrade that too.

How to test

Testing Mobile Wallet Adapter

You will need a Solana Mobile Stack Mobile Wallet Adapter compatible wallet app installed in order to test your integration. As of this writing, there are no commercially available wallets. In the meantime, you can download the fakewallet app from the Solana Mobile Stack SDK (click on this link from your phone).

Without a compatible mobile wallet installed

  1. Open your app on Android in a mobile web browser
    Expect: Your connect button should be armed and read ‘connect’
  2. Click ‘connect’
    Expect: Since you have no mobile wallet installed, you should be redirected to https://solanamobile.com/wallets

With a compatible mobile wallet installed

  1. Open your app on Android in a mobile web browser
    Expect: Your connect button should be armed and read ‘connect’
  2. Click ‘connect’
    Expect: Your mobile wallet app should open and ask you to authorize your web app for use
  3. Accept the authorization
    Expect: You should be redirected back to your web app and the wallet should be connected

Inside a wallet's in-app browser

  1. Open your app on Android in a wallet's in-app browser (eg. the browser inside the Phantom app)
    Expect: Your connect button should read ‘select wallet’
  2. Click ‘select wallet’
    Expect: Your regular wallet set should be displayed. Mobile Wallet Adapter should not be an option.

Testing the Wallet Standard

Any wallet extension that supports the new Solana Wallet Standard will automatically attach to your list of selectable wallets, without you having to configure it. Install a Wallet Standard compliant wallet like Backpack's latest release to see this in action.

  1. Open your app on desktop web
    Expect: Your connect button should read ‘select wallet’
  2. Click ‘select wallet’
    Expect: Installed wallets that support the Wallet Standard should appear as choices in the dialog, alongside your regularly configured wallet set. If you don't have any installed wallets that support the Wallet Standard yet, you will just see the wallet adapters you are using.
  3. If you have the Backpack wallet adapter in your code, remove it and rebuild
    Expect: Backpack is still detected by your app and works. (Make sure you're using Backpack's latest release from Github and have the right RPC connection network selected in Backpack.)

How to give feedback

If you encounter issues with the integration or with the use of a Standard or Mobile wallet please file an issue.

If your app happens to be open source, feel free to reference this GitHub issue in the commit message or the pull request of the change where you do the upgrade.

Products that have upgraded

Search https://cs.github.com/?scopeName=All+repos&scope=&q=path%3Apackage.json+%5C%22%40solana%2Fwallet-adapter-react%5C%22%3A and send PRs to open source libraries. Track them here.

Open Source PRs

Open Source Repos

Closed Source Projects

  • Solend
  • JungleDefi
  • Zeta Markets
  • Coinable Pay
  • Parcl
  • Tiexo
  • Civic
  • Marinade
  • Jupiter
  • Snowflake
  • Solana Mobile Saga Preorder site
  • Light Shield
  • Orca
  • Friktion
  • Dispatch Forums
  • Magic Eden
  • BizFirst
  • SkyWallet
  • Solana.fm
  • Buddy Link
  • Art of Niko
  • Saga TV
  • Gorecats
  • Dual Finance
  • Droplinks
  • Tulip
  • Squads
  • Step Finance
  • Hedge
  • Phantasia
  • BlockLive
  • ADD MORE
@steveluscher steveluscher changed the title [wip][do not act upon yet] Upgrade whole world to Mobile Wallet Adapter & Wallet Standard compatible Solana Wallet Adapter [wip][do not act upon yet] Early Access: Mobile Wallet Adapter & Wallet Standard Oct 17, 2022
@steveluscher steveluscher changed the title [wip][do not act upon yet] Early Access: Mobile Wallet Adapter & Wallet Standard Early Access: Mobile Wallet Adapter & Wallet Standard Oct 18, 2022
@jordaaash jordaaash added the documentation Improvements or additions to documentation label Oct 20, 2022
@gabRiel-bit20
Copy link

Port Finance (https://port.finance/) would love to use the latest wallet adaptor.

@jordaaash
Copy link
Collaborator

@gabRiel-bit20 can you try to follow the steps in this issue? Let us know if you run into issues!

@platocoreteam
Copy link

@jordansexton - we are already using @solana/wallet-adapter-react and @solana/wallet-adapter-react-ui in one of our web app for our eat and earn users. How do we submit PR if our project is closed source? do we add you into our team?

@jordaaash
Copy link
Collaborator

@platocoreteam yes, you can add me to the repo you want to update.

@platocoreteam
Copy link

@jordansexton - we just added you to our repo. can you check?

@olaf-snf
Copy link

olaf-snf commented Nov 1, 2022

@steveluscher @jordansexton Snowflake (https://snowflake.so) is now compatible with Mobile Wallet Adapter. You guys made this so easy. If you could add Snowflake to the compatible product list as well. thanks.

@steveluscher
Copy link
Collaborator Author

Done!

@skywalletadmin
Copy link
Contributor

@steveluscher @jordansexton SKY Wallets' dApps (https://www.getsky.app/) are also now compatible with the Mobile Wallet Adapter and Wallet Standard. Please add SKY Wallet to the compatible products list as well! Thanks.

@adminbizfirst
Copy link

Hi @steveluscher @jordansexton Our product (https://www.bizfirst.xyz/) is now compatible with the Wallet Standard and Mobile Wallet Adapter. Please add us to the compatible list as well. Thank you!

@zfaizal2
Copy link

zfaizal2 commented Nov 2, 2022

Hey @steveluscher @jordansexton

We've got https://app.dispatch.forum/ up to date with the new wallet standard and MWA, please add us to the list -- thanks!

@steveluscher
Copy link
Collaborator Author

Hey @adminbizfirst, DM me on Twitter! I have some questions.

@steveluscher
Copy link
Collaborator Author

Hey @skywalletadmin, I have some questions for you too. DM me on Twitter!

@adminbizfirst
Copy link

adminbizfirst commented Nov 3, 2022

@steveluscher Done, please check. DM'd you from our twitter handle (https://twitter.com/MyBizFirst)

@skywalletadmin
Copy link
Contributor

Hey @steveluscher just DM'd you via our twitter handle (https://twitter.com/GetSkyApp)

@diegofigs
Copy link

Hey @steveluscher @jordansexton, Dual Finance updated to RC a couple days back and will be updating latest version soon. Please add to list, thanks!

@josip-volarevic
Copy link

josip-volarevic commented Nov 4, 2022

Hey there @steveluscher 👋

Dropping off a few of my dApps in case it's not too late:

Proof video for all 3 apps is located here: Google drive video

I might've missed something crucial and also applied too late so worries if you miss adding these dApps to your list!

@flodef
Copy link

flodef commented Nov 7, 2022

Hey @steveluscher 👋
Just wanted to THANK YOU for this fantastic job you are doing.
I did the integration and it was very easy. You did all the hard work !!!
It is definitively life changing for mobile adoption.

@anoushk1234
Copy link

@steveluscher correct me if im wrong, does this mean that we can connect mobile web apps to mobile wallets like phantom? I'm a bit confused since I tried to use the compatible dapps on mobile browser and they didn't connect.

@arihantbansal
Copy link

@steveluscher correct me if im wrong, does this mean that we can connect mobile web apps to mobile wallets like phantom? I'm a bit confused since I tried to use the compatible dapps on mobile browser and they didn't connect.

It's working with the updated dApps. Eg: #604 (comment)

@josip-volarevic
Copy link

@steveluscher correct me if im wrong, does this mean that we can connect mobile web apps to mobile wallets like phantom? I'm a bit confused since I tried to use the compatible dapps on mobile browser and they didn't connect.

@anoushk1234 you should be able to connect mobile web apps to mobile wallets. Currently working mobile wallets are Phantom, Solflare and "fakewallet".

There is most likely an error on your end. Are you on iOS? I'm not sure if there is any support for Solana mobile there.
Did you update your packages to correct dependencies? Do you use the correct cluster on your mobile wallet? e.g. if your local web dapp is on devnet, make sure to switch Phantom to devnet as well

@anoushk1234
Copy link

@steveluscher correct me if im wrong, does this mean that we can connect mobile web apps to mobile wallets like phantom? I'm a bit confused since I tried to use the compatible dapps on mobile browser and they didn't connect.

@anoushk1234 you should be able to connect mobile web apps to mobile wallets. Currently working mobile wallets are Phantom, Solflare and "fakewallet".

There is most likely an error on your end. Are you on iOS? I'm not sure if there is any support for Solana mobile there. Did you update your packages to correct dependencies? Do you use the correct cluster on your mobile wallet? e.g. if your local web dapp is on devnet, make sure to switch Phantom to devnet as well

I'm on safari yes

@anoushk1234
Copy link

@steveluscher just checked this works flawlessly on android, can we get this on ios as well?

@josip-volarevic
Copy link

@anoushk1234 copy pasting this from Solana mobile stack discord channel:

Hello Solana friends,

I'm - I lead the engineering team at FastAF (an iOS application that recently launched an integrated Solana wallet to power token-gated experiences, NFT Rewards and soon to be... crypto payments). ⭐

As a fun follow-up to Steven's news, my team will be working on the iOS spec for the Mobile Wallet Adapter. 🎉

Here's a brief overview on the ups / downs we faced embarking on this fun journey in the iOS world..

We have performed a technical feasibility study for using a variety of transport methods for MWA communication.
Findings: The existing Android specification for MWA calls for two-way app communication over a websocket server.
This is significantly limited by background processing limitations on iOS. (approx. 30 second limit)
However, opening a Websocket or HTTP server via NSURLConnection on iOS does not appear to be a problem.

We are moving forward with two communication schemas:

  • Websocket communication for when the dapp and wallet are not on the same physical device
  • Deep link-based communication (or Safari App Extensions) for when the dapp and wallet are on the same physical device

Will post more updates in this channel as we dive further into the implementation stage.

I don't think iOS integration is expected in the short term roadmap

@anoushk1234
Copy link

@anoushk1234 copy pasting this from Solana mobile stack discord channel:

Hello Solana friends,

I'm - I lead the engineering team at FastAF (an iOS application that recently launched an integrated Solana wallet to power token-gated experiences, NFT Rewards and soon to be... crypto payments). ⭐

As a fun follow-up to Steven's news, my team will be working on the iOS spec for the Mobile Wallet Adapter. 🎉

Here's a brief overview on the ups / downs we faced embarking on this fun journey in the iOS world..

We have performed a technical feasibility study for using a variety of transport methods for MWA communication.
Findings: The existing Android specification for MWA calls for two-way app communication over a websocket server.
This is significantly limited by background processing limitations on iOS. (approx. 30 second limit)
However, opening a Websocket or HTTP server via NSURLConnection on iOS does not appear to be a problem.

We are moving forward with two communication schemas:

  • Websocket communication for when the dapp and wallet are not on the same physical device
  • Deep link-based communication (or Safari App Extensions) for when the dapp and wallet are on the same physical device

Will post more updates in this channel as we dive further into the implementation stage.

I don't think iOS integration is expected in the short term roadmap

yep works on android for me, hope ios is also sorted soon

@flodef
Copy link

flodef commented Nov 15, 2022

It works for me on Android, with Solflare, but Phantom don't display the "accept" button. Seems like a phantom wallet problem...

@josip-volarevic
Copy link

It works for me on Android, with Solflare, but Phantom don't display the "accept" button. Seems like a phantom wallet problem...

This is an issue with Phantom not detecting your selected cluster automatically which fakewallet and solflare do out of the box.
e.g. if your app is using devnet but phantom has mainnet-beta selected, you will experience such an issue

It's asked and answered on solana stackexchange here

@steveluscher
Copy link
Collaborator Author

@steveluscher just checked this works flawlessly on android, can we get this on ios as well?

Check out the iOS effort announcement here and cheer them on! https://discord.com/channels/988649555283308564/988902872773181491/1030613038350475264

@Bewinxed
Copy link

Bewinxed commented Feb 1, 2023

I would love to participate but I'm using svelte at the moment, and the mobile wallet adapter for them is not maintained often :(

@steveluscher
Copy link
Collaborator Author

Thanks for all of your help everyone! We made incredible progress; MWA and Wallet Standard are supported in most places now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests