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

added tailwind wallet #2960

Open
wants to merge 2 commits into
base: stage
Choose a base branch
from

Conversation

baoskee
Copy link

@baoskee baoskee commented Mar 14, 2024

What is the purpose of the change

This pull request adds TAILWIND wallet to Osmosis supported wallets.

Brief Changelog

  • Adds @cosmos-kit/tailwind-extension

Testing and Verifying

This change has been tested locally by rebuilding the website and verified content and links are expected

Documentation and Release Note

This change adds TAILWIND wallet. See tailwind.zone for more info.
Extension link: https://chromewebstore.google.com/detail/tailwind-wallet/dpnfollacokcbkeiidhplhjpafkbfacj

Summary by CodeRabbit

  • New Features
    • Enhanced the wallet list in the app by adding "tailwind-extension" with its logo and specific properties, improving user options for wallet connectivity.

Copy link

vercel bot commented Mar 14, 2024

@baoskee is attempting to deploy a commit to the OsmoLabs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

coderabbitai bot commented Mar 14, 2024

Walkthrough

The changes focus on introducing a new wallet, "tailwind-extension," to the web project's configuration and registry. This addition enhances the CosmosKitWalletList with the tailwindExtensionInfo as a new Wallet entry. By updating dependencies and configurations, the "tailwind-extension" wallet is seamlessly integrated into the project's ecosystem.

Changes

File Path Change Summary
.../generate-cosmos-kit-wallet-list.ts Added tailwindExtensionInfo as Wallet to the CosmosKitWalletList.
.../wallet-registry.ts Added details for "tailwind-extension" wallet entry including logo, window property, installation function, and mobileDisabled flag.
.../package.json Added @cosmos-kit/tailwind-extension version ^1.0.3 to dependencies.

🐰✨
In the realm of code, where changes weave,
A new wallet joins, as we believe.
"Tailwind-extension", with grace it lands,
Among the lines, by coder hands.
Through registry and lists, it finds its place,
A hop, a skip, in the digital space.
🌟🎩🐇

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@baoskee baoskee marked this pull request as ready for review March 14, 2024 06:17
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 2

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 754f2d1 and 5340a6a.
Files ignored due to path filters (3)
  • packages/web/package.json is excluded by: !**/*.json
  • packages/web/public/wallets/tailwind.svg is excluded by: !**/*.svg
  • yarn.lock is excluded by: !**/*.lock
Files selected for processing (2)
  • packages/web/config/generate-cosmos-kit-wallet-list.ts (2 hunks)
  • packages/web/config/wallet-registry.ts (1 hunks)
Additional comments: 5
packages/web/config/generate-cosmos-kit-wallet-list.ts (1)
  • 27-27: The addition of tailwindExtensionInfo to the CosmosKitWalletList is correctly implemented and follows the established pattern.
packages/web/config/wallet-registry.ts (4)
  • 290-290: The mobileDisabled property is correctly set to false, indicating that the wallet is enabled on mobile devices.
  • 292-292: The windowPropertyName is set to "tailwind". Ensure this matches the global window property exposed by the wallet extension for correct integration.
  • 293-296: The lazyInstall function is correctly implemented, following the pattern established for other wallets. It ensures the wallet is loaded only when needed.
  • 297-297: The features array is empty. Verify if this is intentional and whether the wallet supports any specific features that should be listed here.

{
...CosmosKitWalletList["tailwind-extension"],
mobileDisabled: false,
logo: "/wallets/tailwind.svg",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

Codebase Verification

The logo property specifies a path to a wallet's logo that does not exist in the expected location. This indicates an issue with the file path or the file's presence in the repository.

Analysis chain

The logo property correctly specifies the path to the wallet's logo. Ensure the logo file exists at the specified path and is correctly formatted.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify the existence of the tailwind wallet logo SVG file.
if [ -f "public/wallets/tailwind.svg" ]; then
  echo "Tailwind wallet logo exists."
else
  echo "Tailwind wallet logo file is missing."
fi

Length of output: 125

Copy link

vercel bot commented Mar 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
osmosis-frontend ❌ Failed (Inspect) Jun 7, 2024 5:41am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
osmosis-testnet ⬜️ Ignored (Inspect) Visit Preview Jun 7, 2024 5:41am

@jonator
Copy link
Member

jonator commented Mar 14, 2024

Please update from stage and the build should be fixed

@baoskee
Copy link
Author

baoskee commented Mar 17, 2024

updated! @jonator can we run the Vercel preview again? : )

@jonator
Copy link
Member

jonator commented Mar 22, 2024

We're seeing errors in console that the tailwind_injected script is trying to set the readonly keplr object in window. Could you guys provide some background as to why that is?

@CryptoAssassin1
Copy link
Member

@baoskee can you please share the invite codes one for me and other for @kamal-sutra

@baoskee
Copy link
Author

baoskee commented Mar 22, 2024

@baoskee can you please share the invite codes one for me and other for @kamal-sutra

Yes!

@baoskee
Copy link
Author

baoskee commented Mar 22, 2024

We're seeing errors in console that the tailwind_injected script is trying to set the readonly keplr object in window. Could you guys provide some background as to why that is?

Hi @jonator, we override the keplr API for those wanting to pay gas in USDC and the app has not yet supported Tailwind. Existing wallets like Phantom do this for Ethereum and Bitcoin dapps when they moved off Solana, and Rabby does this with MetaMask object so that their users can use Rabby everywhere.

Both wallets just want to provide users the best experience if they choose them and we are doing that here as well. That said, we can patch this in next wallet version for Osmosis.zone URL if you want to eliminate this behavior on your app. It would be a simple content script change in the extension code that removes this behavior for app.osmosis.zone. Please let me know!

@sunnya97
Copy link
Collaborator

Hi @baoskee, yes we would very much appreciate turning off this functionality on Osmosis.

The current status quo of metamask hijacking in EVM world is something we want to avoid in Cosmos!

@baoskee
Copy link
Author

baoskee commented Mar 23, 2024

Hi @baoskee, yes we would very much appreciate turning off this functionality on Osmosis.

The current status quo of metamask hijacking in EVM world is something we want to avoid in Cosmos!

sounds good, can get wallet patch in by Monday-Tuesday next week 🫡 (it takes a few days for Chrome store to approve; and it will be an independent release from this PR). Thanks!

@kamal-sutra
Copy link
Contributor

@baoskee 1. when the page is refreshed, the wallet disconnects and when connect is clicked, it shows install wallet. But connects well after clicking the tailwind wallet.
2. When depositing AKT or any other asset, it doesn't automatically select the same asset as network fee.
3. For some reason AKT is not in the list of fee tokens although there is available balance.
4. Is it necessary to show whole list of other fee tokens for deposit tx? (unless you manually add every token as acceptable fee currencies)
Screencast from 23-03-24 12:55:09 PM IST.webm

@CryptoAssassin1
Copy link
Member

CryptoAssassin1 commented Mar 23, 2024

@baoskee wallet is installed and i login successfully but im still getting Tailwind is not Installed.

Trade.on.Osmosis.Zone.22.mp4

@baoskee
Copy link
Author

baoskee commented Mar 25, 2024

Hi @baoskee, yes we would very much appreciate turning off this functionality on Osmosis.
The current status quo of metamask hijacking in EVM world is something we want to avoid in Cosmos!

sounds good, can get wallet patch in by Monday-Tuesday next week 🫡 (it takes a few days for Chrome store to approve; and it will be an independent release from this PR). Thanks!

Issue fixed in 1.18.2! Should prevent content script override of keplr object on app.osmosis.zone and osmosis.zone.

@baoskee
Copy link
Author

baoskee commented Mar 25, 2024

@baoskee 1. when the page is refreshed, the wallet disconnects and when connect is clicked, it shows install wallet. But connects well after clicking the tailwind wallet. 2. When depositing AKT or any other asset, it doesn't automatically select the same asset as network fee. 3. For some reason AKT is not in the list of fee tokens although there is available balance. 4. Is it necessary to show whole list of other fee tokens for deposit tx? (unless you manually add every token as acceptable fee currencies) Screencast from 23-03-24 12:55:09 PM IST.webm

  1. Will triage and fix, thank you for pointing this out 🫡
  2. This is a feature not a bug. The confusion for users is that they don't want to pick a different gas token for each chain. They should be able to pay with any gas token, and the wallet shows the preferred (default) gas token
  3. Right now, we query only Osmosis balances for fee tokens, because we heavily depend on Osmosis Fee Abstraction. Next step we will query native balances and users will be able to use AKT not on Osmosis
  4. Interesting idea! Right now we just take the intersection of all Osmosis allowable fee tokens in the Fee Abstraction module + those available on Osmosis. Is there a reason why users should have to whitelist each fee token before using it as gas?

@baoskee
Copy link
Author

baoskee commented Mar 25, 2024

@baoskee wallet is installed and i login successfully but im still getting Tailwind is not Installed.

Trade.on.Osmosis.Zone.22.mp4

Thanks @CryptoAssassin1! This looks like @kamal-sutra's first issue; I will take a look and fix. Good catch.

@kamal-sutra
Copy link
Contributor

@baoskee 1. when the page is refreshed, the wallet disconnects and when connect is clicked, it shows install wallet. But connects well after clicking the tailwind wallet. 2. When depositing AKT or any other asset, it doesn't automatically select the same asset as network fee. 3. For some reason AKT is not in the list of fee tokens although there is available balance. 4. Is it necessary to show whole list of other fee tokens for deposit tx? (unless you manually add every token as acceptable fee currencies) Screencast from 23-03-24 12:55:09 PM IST.webm

  1. Will triage and fix, thank you for pointing this out 🫡
  2. This is a feature not a bug. The confusion for users is that they don't want to pick a different gas token for each chain. They should be able to pay with any gas token, and the wallet shows the preferred (default) gas token
  3. Right now, we query only Osmosis balances for fee tokens, because we heavily depend on Osmosis Fee Abstraction. Next step we will query native balances and users will be able to use AKT not on Osmosis
  4. Interesting idea! Right now we just take the intersection of all Osmosis allowable fee tokens in the Fee Abstraction module + those available on Osmosis. Is there a reason why users should have to whitelist each fee token before using it as gas?

Thanks for all the clarifications.
Point 4 is moot if 2 is a feature.

@baoskee
Copy link
Author

baoskee commented Mar 27, 2024

Looks like I tested without Keplr extension installed, so all these issues I was able to reproduce with Keplr extension also installed. Will test under this condition next time 🫡

  • 1.18.3 TAILWIND Extension patch fixes "Installed Wallet" issue when wallet is already installed
  • should take 1-2 days for approval

For refreshing after connect issue:

Also for the keplr override issue, these are the hostnames I added to skip-list:

const KEPLR_HOSTNAME_SKIPLIST = ["osmosis.zone", "app.osmosis.zone"];

So the extension still overrides on local and preview environments, but it won't override in production. Let me know what other domains you want to add to this list.

@baoskee
Copy link
Author

baoskee commented Apr 8, 2024

Looks like I tested without Keplr extension installed, so all these issues I was able to reproduce with Keplr extension also installed. Will test under this condition next time 🫡

  • 1.18.3 TAILWIND Extension patch fixes "Installed Wallet" issue when wallet is already installed
  • should take 1-2 days for approval

For refreshing after connect issue:

Also for the keplr override issue, these are the hostnames I added to skip-list:

const KEPLR_HOSTNAME_SKIPLIST = ["osmosis.zone", "app.osmosis.zone"];

So the extension still overrides on local and preview environments, but it won't override in production. Let me know what other domains you want to add to this list.

All issues addressed! Rebased stage branch and updated new lockfile with @cosmos-kit/tailwind-extension version 1.0.3. 🫡 @kamal-sutra @CryptoAssassin1

@baoskee
Copy link
Author

baoskee commented Apr 17, 2024

Hi guys @kamal-sutra @CryptoAssassin1 @jonator. Can I get an update for this?

@kamal-sutra
Copy link
Contributor

@baoskee can you update the branch to latest stage or prod.

@kamal-sutra
Copy link
Contributor

With Keplr extension enabled or disabled, when osmosis page is refreshed it disconnects Tailwind and asks to connect/install

image
image

@kamal-sutra
Copy link
Contributor

While depositing Atom or any asset, it shows Osmo as network fee on Tailwind tx window, but it is taking Atom only as fee (can be seen on mintscan). So, is it a network fee display bug or the multi token fee feature is not working?
image
image

@kamal-sutra
Copy link
Contributor

Keplr extension is disabled. Click connect wallet and select Keplr, it is still connecting keplr (which should not)
Screencast from 23-04-24 01:08:32 PM IST.webm

@CryptoAssassin1
Copy link
Member

@kamal-sutra you are testing on old perview deploy.
@jonator can you please approve new deploy.

@sunnya97
Copy link
Collaborator

I approved

@CryptoAssassin1
Copy link
Member

@sunnya97 build failed.

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

Successfully merging this pull request may close these issues.

None yet

5 participants