aufacicenta / pulsemarkets

pulsemarkets-v2-web.vercel.app
1 stars 3 forks source link

feat: add wallet selector #211

Closed Udit-takkar closed 11 months ago

Udit-takkar commented 11 months ago

Fixes: https://github.com/aufacicenta/pulsemarkets/issues/209

1) what are guest wallets ? how to connect guest wallets here?

Demo

Screenshot 2023-11-19 at 6 35 04 PM Screenshot 2023-11-19 at 6 35 19 PM Screenshot 2023-11-19 at 6 35 35 PM

Packages Added:- @web3modal/wagmi, wagmi and viem

Environment Variable added

NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID

Create a project on https://cloud.walletconnect.com and copy the project id

vercel[bot] commented 11 months ago

@Udit-takkar is attempting to deploy a commit to the Aufacicenta Team on Vercel.

A member of the Team first needs to authorize it.

netpoe commented 11 months ago

@Udit-takkar wagmi and this package looks good. I'll make some updates to your code and I'll merge it.

Udit-takkar commented 11 months ago

@Udit-takkar wagmi and this package looks good. I'll make some updates to your code and I'll merge it.

Okay

Udit-takkar commented 11 months ago

@netpoe i am getting some errors after pulling your changes.

Screenshot 2023-11-26 at 1 55 24 AM

ah, yes! forgot about that. There's a sequelize provider that requires this package. You need to:

cd database/
touch .env
sh install.sh

cd app/
yarn link "@aufacicenta/fileagent-db"
Udit-takkar commented 11 months ago

@netpoe should i also remove NearMarketContractContextController and NearPromptWarsMarketContractContextController (and related files useNearPromptWarsMarketContractContext ?

These file uses useWalletStateContext(). what does walletState.context.connection and walletState.context.wallet represent? we would have to replace it with something from wagmi hooks and remove @near-wallet-selector too.

netpoe commented 11 months ago

@netpoe should i also remove NearMarketContractContextController and NearPromptWarsMarketContractContextController (and related files useNearPromptWarsMarketContractContext ?

These file uses useWalletStateContext(). what does walletState.context.connection and walletState.context.wallet represent? we would have to replace it with something from wagmi hooks and remove @near-wallet-selector too.

Yeah... This is an interesting problem. We don't want to break the game functionality but we don't want to turn this PR into a huge refactor.

What's your take in this one? Should we merge this one and start a new PR that removes all NEAR functionality? This would be better no?

The EVM Wallet Selector works fine already. Let's merge and start a new PR to remove all NEAR features and implement the Solidity features.

netpoe commented 11 months ago

@Udit-takkar paid! Let's start a new PR branching out from ´aufacienta:EVM´ to move away from NEAR and integrate the new Solidity ABI.

Udit-takkar commented 11 months ago

@netpoe ok