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

feat: add dependencies support on wallet-api and dapp browser for transaction #7634

Merged
merged 3 commits into from
Aug 20, 2024

Conversation

Justkant
Copy link
Contributor

✅ Checklist

  • npx changeset was attached.
  • Covered by automatic tests. Manually tested the dependencies on desktop and mobile (you can find the manifest used below)
  • Impact of the changes:
    • Discover apps and other live-apps like buy/sell or card transaction calls (but the change is only an addition with no modification of behaviour)
    • App dependencies install

📝 Description

Add dependencies support on wallet-api and dapp browser for transaction by exposing the dependencies param already present in the connectApp action

Also bump the wallet-api to add dependencies option

Tested manually with current prod and this PR especially with the changes on the dapp-browser v2 where I made sure we don't introduce a breaking change for old versions of LL if we use the option.

You can use this manifest below to test that we install the listed apps when doing the transaction
{
  "id": "1inch-v2",
  "name": "1inch",
  "private": false,
  "url": "https://app.1inch.io/",
  "dapp": {
    "nanoApp": "1inch",
    "dependencies": ["Paraswap", "Squid"],
    "networks": [
      {
        "currency": "ethereum",
        "chainID": 1,
        "nodeURL": "https://eth-dapps.api.live.ledger.com"
      },
      {
        "currency": "bsc",
        "chainID": 56,
        "nodeURL": "https://bsc-dataseed.binance.org/"
      },
      {
        "currency": "polygon",
        "chainID": 137,
        "nodeURL": "https://polygon-mainnet.g.alchemy.com/v2/oPIxZM7kXsPVVY1Sk0kOQwkoIOpSu8PE"
      },
      {
        "currency": "arbitrum",
        "chainID": 42161,
        "nodeURL": "https://arb1.arbitrum.io/rpc"
      },
      {
        "currency": "optimism",
        "chainID": 10,
        "nodeURL": "https://mainnet.optimism.io"
      }
    ]
  },
  "homepageUrl": "https://1inch.io/",
  "icon": "https://cdn.live.ledger.com/icons/platform/1inch.png",
  "platforms": ["android", "desktop"],
  "apiVersion": "^2.0.0",
  "manifestVersion": "2",
  "branch": "stable",
  "categories": ["swap"],
  "currencies": ["ethereum", "bsc", "polygon", "arbitrum", "optimism"],
  "content": {
    "shortDescription": {
      "en": "Exchange crypto via a Defi/DEX aggregator on Ethereum mainnet, BSC or Polygon"
    },
    "description": {
      "en": "Exchange crypto via a Defi/DEX aggregator on Ethereum mainnet, BSC or Polygon"
    }
  },
  "permissions": [],
  "domains": ["http://", "https://"],
  "visibility": "complete"
}

❓ Context

  • JIRA or GitHub link:

🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.
  • Performance considerations have been taken into account. (changes have been profiled or benchmarked if necessary)

…nsaction

Also bump the wallet-api to add dependencies option
@Justkant Justkant self-assigned this Aug 20, 2024
@Justkant Justkant requested review from a team as code owners August 20, 2024 14:13
Copy link

vercel bot commented Aug 20, 2024

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

Name Status Preview Comments Updated (UTC)
web-tools ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 20, 2024 2:58pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-docs ⬜️ Ignored (Inspect) Visit Preview Aug 20, 2024 2:58pm
ledger-live-github-bot ⬜️ Ignored (Inspect) Visit Preview Aug 20, 2024 2:58pm
native-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Aug 20, 2024 2:58pm
react-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Aug 20, 2024 2:58pm

@live-github-bot live-github-bot bot added desktop Has changes in LLD mobile Has changes in LLM common Has changes in live-common labels Aug 20, 2024
@@ -11,7 +11,7 @@ type Props = {
choices: string[];
multipleChoices: boolean;
path: string;
initalValue: string[] | string;
Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch

ComradeAERGO
ComradeAERGO previously approved these changes Aug 20, 2024
@Justkant Justkant merged commit 8ff87b2 into develop Aug 20, 2024
58 checks passed
@Justkant Justkant deleted the feat/LIVE-13446 branch August 20, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Has changes in live-common desktop Has changes in LLD mobile Has changes in LLM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants