Closed H34D closed 2 months ago
🟢 [UPDATE] Adding Phantom to our list of accepted and available wallets
First time working on SDK + Masa-React + SBT integration repos. In this case, I added the Phantom wallet but I'm not able to connect as shown on the video below. I think I'm not configuring the connecter well, will follow that path
🟢 [UPDATE] Adding Phantom to our list of accepted and available wallets
First time working on SDK + Masa-React + SBT integration repos. In this case, I added the Phantom wallet but I'm not able to connect as shown on the video below. I think I'm not configuring the connecter well, will follow that path
there is no configuration for solana networks on the sdk, therefore we can not connect to them right now. I am working on that right now
I think you must fix this with synthetic data somehow (in the time being)
I think you must fix this with synthetic data somehow (in the time being)
In other words, mocking the SDK, right?
Since I'm having trouble figuring it out from just looking and browsing the codebase, I'm gonna look for some PR where we add a new wallet to know how to do it.
DISCLAIMER: I'm not focusing on Solana itself since Phantom also works for ETH. When solana gets finally added to the SDK (SDK#334 we shall test this completely)
In other words, mocking the SDK, right?
probably yes, always keep in mind. a spike must not necessarly yield code or a PR but rather a solid base for decision making so it can be estimated or implemented easier in the future.
In other words, mocking the SDK, right?
probably yes, always keep in mind. a spike must not necessarly yield code or a PR but rather a solid base for decision making so it can be estimated or implemented easier in the future.
Okay, so I'll be updating the list of wallets to have in mind in this ticket's description and continue understanding how the integration of said wallets would work
Below you can find the same output of the spike I added to the Description of this ticket (sharing it here just to freeze it in case it changes).
Moving this to review since I find this work to be done. Nonetheless, I'd continue digging deeper into Masa-React to understand how the actual implementation would look like (due to my lack of context of this side of the application)
First time working on SDK + Masa-React + SBT integration repos. In this case, I added the Phantom wallet but I'm not able to connect as shown on the video below. I think I'm not configuring the connecter well, will follow that path
i rewatched the video and i think its because we are not running the lastest wagmi and viem there is a PR for that that got stale: https://github.com/masa-finance/masa-react/pull/514
i have tried it myself and it does not seem to detect the phantom wallet extension at all on chrome in the current version of rainbowkit/wagmi:
@juanmanso have you tested connecting a ledger to the phantom wallet? I added this aspect to the acceptance criteria.
@juanmanso have you tested connecting a ledger to the phantom wallet? I added this aspect to the acceptance criteria.
I haven't since I got no Ledger myself 😞
I haven't since I got no Ledger myself 😞
ok, i tested that, it works well with Phantom
@juanmanso follow up tickets missing
Closed with these follow-up tickets:
Reopening the issue due to this finding:
While working on adding Masa as a valid testnet on new implementation of Wagmi v2 (masa-finance/masa-react#590), I found that Solana is not supported by
wagmi/chains
:Furthermore, when reading deeper into Phantom's doc about Rainbowkit there's a was a clear reference that it would only work on EVM-compatible chains, thus
Ethereum
andPolygon
. Support for Solana chain is not there since wagmi is strictly EVM-compatible and Solana goes away from that.My conclusion is that this task is no longer blocked by Rainbowkit + Wagmi + Viem update to 2.x, but it would require a separated implementation such as
@solana/wallet-adapter-react
. Will sync with the team to groom next steps
From other projects that support both ETH and SOL I found they either:
Either way solutions are not straight forward as it seemed, so we need to reassess priorities :disappointed:
As pointed out by @H34D this depends on how we want to handle the UX on the app. Currently we connect the wallet first and then select the network.
With the current findings, we might need to first have the user select the network and then give them the connect button so they select wallets.
For this UX/UI change to be determined, we need to sync with @giovaroma to find a solution on then move forward with implementation.
As pointed out by @H34D this depends on how we want to handle the UX on the app. Currently we connect the wallet first and then select the network.
With the current findings, we might need to first have the user select the network and then give them the connect button so they select wallets.
For this UX/UI change to be determined, we need to sync with @giovaroma to find a solution on then move forward with implementation.
In parallel, I'll look at ways to connect any solana wallet into our frontend (with emphasis in supporting Phantom which is the one we found most popular)
As per solana's docs, I'm trying out dynamic. Looks promising so far.
As per solana's docs, I'm trying out dynamic. Looks promising so far.
It looks like it's working fine. The only issue is that it's a paid service. $99 for the first 2k MAUs and $0.05/MAU after that.
Joining to pair and try a free alternative here
Made a spike based on this docs integrating @solana/wallet-adapter-wallets
:
Made it work but it diverges from our own UX on the SBT app:
Summary loom video to detail current issue (1.5x or more recommended 😄):
https://www.loom.com/share/111851fc49bb446c87eaf1c1de224d7a?sid=81cc0b47-7e23-444b-b4d3-fca3b7c5aec9
Added blocked label hoping it gives more visibility
Since it seems that we are gonna move forward with the free option, I'm trying to make the connection work on masa-react
.
As it can be seen on the image below, the UI seems to be working but when clicking the Select Wallet
button, nothing happens:
It may be due to the initiation of the providers, where we are passing an empty wallet's array whereas the example passes a new UnsafeBurnerWalletAdapter
. We are not using it because by using it we break the Storybook receiving the following error message:
We are still investigating what's going on with this issue and will update soon
🟢 [UPDATE]
Fixed the webpack errors but still not popping up the Phantom wallet.
First I tried with this stack overflow suggestion to change the webpack.config.js
. Tried everything and no success there. Then I asked myself if it might be a storybook issue rather than a global webpack thing (which would come up eventually but I'm testing on Storybook first).
So, I found this other stack overflow answer, that suggested to change the .storybook/main.js
file which I did and errors are no longer showing.
Now, I have to figure out why Wallet connection is not showing on Phantom
Closing this task since we are not gonna make it to the deadline since we won't get the definitions in time
We are planning to deploy smart contracts to solana. To make sure we can actually use the contracts from our frontend with the given infrastructure we must research the different wallet types available for solana.
Acceptance Criteria
rainbow kit(why?) some libraryOutput
List of most used Solana Wallets
Phantom
The most used Solana wallet on the ecosystem is Phantom. It could be compared with Metamask on its dominance on the market share. Aside from Solana, it has integration with:
Solflare
There were some competitors back in 2021 to Phantom like Sollet eventually died off but one of the oldest that stayed strong in the community is Solflare. Lost the initial battle with Phantom due to UI/UX but still has a following.
Another thing worth noting is that it is Solana only, not like Phantom.
Ledger
Although this is a hardware wallet, it has its own wallet application to use across the web. Phantom and Solflare provide integration with Ledger but having Ledger on its own integrated into our apps might be worth considering.
How to proceed
First of all we must update rainbowkit and wagmi to the latest version. See #590Based on the previous decision making on which wallets to support, I'm assuming that we would like to offer the most popular one as we are doing with Metamask for the SBT app. Thus my suggestion would be to just focus integrating Phantom since it is the most popular and it's already supported on Rainbowkit (Phantom's how-to, Rainbowkit's mention of Phantom).
Implementation steps (high-level)
allowedWallets
atsrc/layout/Providers.tsx