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

✨(lld): add actions in ordis drawer #7951

Merged
merged 1 commit into from
Oct 1, 2024
Merged

Conversation

LucasWerey
Copy link
Contributor

@LucasWerey LucasWerey commented Sep 30, 2024

βœ… Checklist

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
    • NewArch nft drawer (ordis too)

πŸ“ Description

Refactor hooks that implements the actions inside nft/ordis drawer so it works using our nft metadata and simplehash API
Inscriptions can be seen on magicEden / ordinals.com or set as custom lock screen on stax/flex

Screen.Recording.2024-09-30.at.15.51.47.mov

❓ Context


🧐 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)

@LucasWerey LucasWerey requested a review from a team as a code owner September 30, 2024 14:17
Copy link

vercel bot commented Sep 30, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
web-tools ❌ Failed (Inspect) Sep 30, 2024 4:49pm
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-docs ⬜️ Ignored (Inspect) Visit Preview Sep 30, 2024 4:49pm
ledger-live-github-bot ⬜️ Ignored (Inspect) Visit Preview Sep 30, 2024 4:49pm
native-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Sep 30, 2024 4:49pm
react-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Sep 30, 2024 4:49pm

@@ -7,7 +7,9 @@ import { BitcoinAccount } from "@ledgerhq/coin-bitcoin/lib/types";
import { useBitcoinAccountModel } from "./useBitcoinAccountModel";
import InscriptionDetailsDrawer from "../../components/Inscriptions/DetailsDrawer";

type ViewProps = ReturnType<typeof useBitcoinAccountModel>;
type ViewProps = ReturnType<typeof useBitcoinAccountModel> & {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not adding account to the return type of useBitcoinAccountModel ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No real reason just find it more explicit to do this way. So we know that we don't change account in the Model

})),

...(marketplacePages.length > 0 ? [{ id: "sep2", type: "separator", label: "" }] : []),
explorerLink && {
Copy link
Contributor

Choose a reason for hiding this comment

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

if explorerLink is falsy, you will get an unwanted false value in your array

]);
} else {
const linksRecord = links as Record<string, string>;
return safeList([
Copy link
Contributor

Choose a reason for hiding this comment

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

same here , avoid having a [false, false, false] or mixed with false array type

import { NFTMetadata, ProtoNFT } from "@ledgerhq/types-live";
import { isNFTMetadata } from "../utils/typeGuardsChecker";
import { createOrdinalExplorerUrl } from "../utils/createOrdinalExplorerUrl";

Copy link
Contributor

Choose a reason for hiding this comment

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

(suggestion) can you summarise in few words what this hook stands for please?

@LucasWerey LucasWerey merged commit a7696cc into develop Oct 1, 2024
53 of 55 checks passed
@LucasWerey LucasWerey deleted the feat/LIVE-14261 branch October 1, 2024 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
desktop Has changes in LLD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants