Skip to content

Commit

Permalink
Merge branch 'LedgerHQ:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-meilan committed Sep 27, 2024
2 parents ef8ddbc + 6464ba7 commit 9e9e0d8
Show file tree
Hide file tree
Showing 54 changed files with 2,861 additions and 1,266 deletions.
6 changes: 6 additions & 0 deletions .changeset/dry-otters-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"ledger-live-desktop": patch
"@ledgerhq/live-nft": patch
---

Add detail drawers for inscriptions of ordinals protocol
8 changes: 8 additions & 0 deletions .changeset/rare-yaks-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@ledgerhq/coin-near": patch
"ledger-live-desktop": patch
"live-mobile": patch
"@ledgerhq/live-common": patch
---

remove rewards feature from near
5 changes: 5 additions & 0 deletions .changeset/six-hairs-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": patch
---

Run tests files at `e2e/specs/*.spec.ts`
14 changes: 13 additions & 1 deletion .github/workflows/build-and-test-external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:
jobs:
determine-affected:
name: "Turbo Affected"
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-desktop') && github.event.pull_request.head.repo.full_name != github.repository }}
if: ${{github.event.pull_request.head.repo.full_name != github.repository }}
uses: LedgerHQ/ledger-live/.github/workflows/turbo-affected-reusable.yml@develop
with:
head_branch: ${{ github.event.pull_request.head.ref || github.event.merge_group.head_ref }}
Expand All @@ -26,18 +26,30 @@ jobs:
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-desktop') && github.event.pull_request.head.repo.full_name != github.repository }}
uses: LedgerHQ/ledger-live/.github/workflows/build-desktop-external-reusable.yml@develop
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
secrets: inherit

test-desktop-external:
name: "[External] Test Desktop"
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-desktop') && github.event.pull_request.head.repo.full_name != github.repository }}
uses: LedgerHQ/ledger-live/.github/workflows/test-desktop-external-reusable.yml@develop
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
secrets: inherit

build-mobile-external:
name: "[External] Build Mobile"
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-mobile') && github.event.pull_request.head.repo.full_name != github.repository}}
uses: LedgerHQ/ledger-live/.github/workflows/build-mobile-external-reusable.yml@develop
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
secrets: inherit

# Final Check required
ok:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-and-test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ permissions:
jobs:
determine-affected:
name: "Turbo Affected"
if: ${{github.event.pull_request.head.repo.full_name == github.repository }}
uses: LedgerHQ/ledger-live/.github/workflows/turbo-affected-reusable.yml@develop
with:
head_branch: ${{ github.event.pull_request.head.ref || github.event.merge_group.head_ref }}
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/build-desktop-external-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@ name: "@Desktop • Build App (external)"

on:
workflow_call:
workflow_dispatch:
inputs:
ref:
type: string
description: |
If you run this manually, and want to run on a PR, the correct ref should be refs/pull/{PR_NUMBER}/merge to
have the "normal" scenario involving checking out a merge commit between your branch and the base branch.
If you want to run only on a branch or specific commit, you can use either the sha or the branch name instead (prefer the first verion for PRs).
required: false
login:
description: The GitHub username that triggered the workflow
required: false
base_ref:
description: The base branch to merge the head into when checking out the code
required: false
required: true
repository:
description: The repository to checkout the code from
type: string
required: true

jobs:
build-desktop-app:
Expand Down Expand Up @@ -46,7 +44,9 @@ jobs:
}
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: Setup git user
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-git-user@develop
Expand Down
29 changes: 14 additions & 15 deletions .github/workflows/build-mobile-external-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,34 @@ name: "@Mobile • Build App (external)"

on:
workflow_call:
workflow_dispatch:
inputs:
ref:
type: string
description: |
If you run this manually, and want to run on a PR, the correct ref should be refs/pull/{PR_NUMBER}/merge to
have the "normal" scenario involving checking out a merge commit between your branch and the base branch.
If you want to run only on a branch or specific commit, you can use either the sha or the branch name instead (prefer the first verion for PRs).
login:
description: The GitHub username that triggered the workflow
required: false
base_ref:
description: The base branch to merge the head into when checking out the code
required: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name != 'develop' && github.ref || github.run_id }}
cancel-in-progress: true
required: true
repository:
description: The repository to checkout the code from
type: string
required: true

permissions:
contents: read

jobs:
build-mobile-app-android:
name: "Build Ledger Live Mobile (Android)"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
NODE_OPTIONS: "--max-old-space-size=7168"
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: Setup git user
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-git-user@develop
Expand Down Expand Up @@ -92,7 +89,9 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: Setup git user
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-git-user@develop
Expand All @@ -105,7 +104,7 @@ jobs:
run: pnpm i --filter="live-mobile..." --filter="ledger-live" --no-frozen-lockfile --unsafe-perm

report:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [build-mobile-app-android, build-mobile-app-ios]
if: ${{ !cancelled() && github.event_name == 'workflow_dispatch' }}
steps:
Expand Down
63 changes: 25 additions & 38 deletions .github/workflows/test-desktop-external-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,18 @@ name: "@Desktop • Test App (external)"

on:
workflow_call:
workflow_dispatch:
inputs:
ref:
type: string
description: |
If you run this manually, and want to run on a PR, the correct ref should be refs/pull/{PR_NUMBER}/merge to
have the "normal" scenario involving checking out a merge commit between your branch and the base branch.
If you want to run only on a branch or specific commit, you can use either the sha or the branch name instead (prefer the first verion for PRs).
required: false
login:
description: The GitHub username that triggered the workflow
required: false
base_ref:
description: The base branch to merge the head into when checking out the code
required: false
required: true
repository:
description: The repository to checkout the code from
type: string
required: true

permissions:
id-token: write
Expand All @@ -27,12 +25,14 @@ jobs:
env:
NODE_OPTIONS: "--max-old-space-size=7168"
FORCE_COLOR: 3
CI_OS: ubuntu-latest
runs-on: ubuntu-latest
CI_OS: ubuntu-22.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: Setup the toolchain
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop
Expand Down Expand Up @@ -63,12 +63,14 @@ jobs:
env:
NODE_OPTIONS: "--max-old-space-size=7168"
FORCE_COLOR: 3
CI_OS: ubuntu-latest
runs-on: ubuntu-latest
CI_OS: ubuntu-22.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: Setup the toolchain
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop
Expand All @@ -84,17 +86,19 @@ jobs:
env:
NODE_OPTIONS: "--max-old-space-size=7168"
FORCE_COLOR: 3
CI_OS: ubuntu-latest
CI_OS: ubuntu-22.04
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
# DEBUG: "pw:browser*"
# DEBUG_LOGS: 1
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
status: ${{ steps.tests.outcome }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: Setup the toolchain
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop
Expand Down Expand Up @@ -147,12 +151,14 @@ jobs:

report:
needs: [codechecks, unit-tests, e2e-tests-linux]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: ${{ !cancelled() && github.event_name == 'workflow_dispatch' }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: "download linter results"
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -318,22 +324,3 @@ jobs:
with:
name: summary.json
path: ${{ github.workspace }}/summary.json

allure-report:
name: "Allure Reports Export on Server"
needs: [e2e-tests-linux]
runs-on: [ledger-live-medium]
if: ${{ !cancelled() && github.ref_name == 'develop' }}
steps:
- name: checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
- name: Send Results and Generate Allure Report - Linux
uses: LedgerHQ/ledger-live/tools/actions/composites/upload-allure-report@develop
if: ${{ !cancelled() }}
with:
platform: linux
login: ${{ vars.ALLURE_USERNAME }}
password: ${{ secrets.ALLURE_LEDGER_LIVE_PASSWORD }}
path: allure-results-linux
1 change: 1 addition & 0 deletions apps/ledger-live-desktop/index-types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ interface Window {

getAllFeatureFlags: (appLanguage: string) => Partial<{ [key in FeatureId]: Feature }>;
getAllEnvs: () => { [key in EnvName]: unknown };
saveLogs: (path: string) => void;

// for mocking purposes apparently?
// eslint-disable-next-line
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from "react";
import { Flex, Icons, IconsLegacy, Text } from "@ledgerhq/react-ui";
import Button from "~/renderer/components/Button";
import { useTranslation } from "react-i18next";

const Actions = () => {
const { t } = useTranslation();
return (
<Flex alignItems="center" columnGap={12}>
<Button
outlineGrey
style={{ flex: 1, justifyContent: "center" }}
my={4}
onClick={() => {
/* TODO */
}}
center
>
<Flex columnGap={1}>
<Icons.Eye color="neutral.c100" />
<Text variant="bodyLineHeight" fontWeight="600" fontSize={14} color="neutral.c100">
{t("ordinals.inscriptions.detailsDrawer.hide")}
</Text>
</Flex>
</Button>
<Button outlineGrey>
<IconsLegacy.OthersMedium />
</Button>
</Flex>
);
};
export default Actions;
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React from "react";
import { Flex, Text } from "@ledgerhq/react-ui";
import IconContainer from "LLD/features/Collectibles/components/Collection/TableRow/IconContainer";
import { IconProps } from "LLD/features/Collectibles/types/Collection";
import { MappingKeys } from "LLD/features/Collectibles/types/Ordinals";
import { useTranslation } from "react-i18next";

type Props = {
icons: (({ size, color, style }: IconProps) => JSX.Element)[];
names: MappingKeys[];
};

const SubTitle: React.FC<Props> = ({ icons, names }) => {
const { t } = useTranslation();
return (
<Flex mb={20} alignItems="center" columnGap={12}>
<IconContainer icons={icons} iconNames={names} />
<Text variant="bodyLineHeight" fontSize={14} color="neutral.c70">
{t("ordinals.inscriptions.detailsDrawer.storedOnChain")}
</Text>
</Flex>
);
};

export default SubTitle;
Loading

0 comments on commit 9e9e0d8

Please sign in to comment.