dtube / DTubeGo

DTube mobile client created in dart and flutter!
GNU General Public License v3.0
36 stars 15 forks source link

pancakeswap "buy" button inside the wallet page #221

Open tibfox opened 2 years ago

tibfox commented 2 years ago

If there is any way to add this button to the wallet pager it would ecourage users to buy dtc with the app see minds app as an example @brishtiteveja can you please add a screenhot of the button here?

brishtiteveja commented 2 years ago

I think it's pretty straightforward..

  1. Have a "Buy DTC token" button in the app
  2. Upon clicking on the button - ask user whether they have metamask installed on their phone. 2.1. If false, ask them to install metamask. 2.2. If yes, open a Web Browser page within the app (https://pub.dev/packages/flutter_inappwebview) for our contract address URL https://pancakeswap.finance/swap?outputCurrency=0xd3cceb42b544e91eee02eb585cc9a7b47247bfde 2.3. And then using "wallet connect" in the pancakeswap browser window, if metamask is installed, it automatically I think gets connected (this part will have to be tested.. but seems to be working in other apps I saw implemented.. for example Minds social app). It jumps you to the metamask app in the device.. and metamask then asks whether user should connect. 2.4. Once connected with metamask.. then you can jump back to the dtube app with the browser window open, and you can now trade DTC with BNB etc.