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

fix(llm): πŸ› fix long Memo Tag issue on Stacks #8604

Merged
merged 6 commits into from
Dec 6, 2024

Conversation

thesan
Copy link
Contributor

@thesan thesan commented Dec 4, 2024

βœ… Checklist

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
    • ...

πŸ“ Description

Truncate Stacks memos in the input to prevent the transaction validation from failing. Follow up to #8340.

Screen.Recording.2024-12-04.at.18.28.15.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)

@thesan thesan requested a review from a team as a code owner December 4, 2024 17:34
Copy link

vercel bot commented Dec 4, 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 Dec 5, 2024 7:09pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-github-bot ⬜️ Ignored (Inspect) Visit Preview Dec 5, 2024 7:09pm
native-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Dec 5, 2024 7:09pm
react-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Dec 5, 2024 7:09pm

@live-github-bot live-github-bot bot added mobile Has changes in LLM common Has changes in live-common labels Dec 4, 2024
import type { Transaction as StacksTransaction } from "@ledgerhq/live-common/families/stacks/types";
import type { MemoTagInputProps } from "LLM/features/MemoTag/types";
import { GenericMemoTagInput } from "LLM/features/MemoTag/components/GenericMemoTagInput";

export default (props: MemoTagInputProps<StacksTransaction>) => (
<GenericMemoTagInput
{...props}
textToValue={text => text.slice(0, STACKS_MAX_MEMO_SIZE)}
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if we want to have this solution, can you confirm with our PM, please?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I double checked

@thesan thesan changed the title fix(llm): πŸ› fix long Memo Tag issue in Stacks fix(llm): πŸ› fix long Memo Tag issue on Stacks Dec 5, 2024
ComradeAERGO
ComradeAERGO previously approved these changes Dec 5, 2024
Copy link
Contributor

@ComradeAERGO ComradeAERGO left a comment

Choose a reason for hiding this comment

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

LGTM

KVNLS
KVNLS previously approved these changes Dec 5, 2024
@thesan
Copy link
Contributor Author

thesan commented Dec 5, 2024

@KVNLS @ComradeAERGO thank you for the reviews but I will have to edit this PR because the size limit is not 34 chars is 34 bytes so the current solution doesn't work for non ASCII characters:

Screen.Recording.2024-12-05.at.18.19.45.mov

@thesan thesan dismissed stale reviews from KVNLS and ComradeAERGO via e71286f December 5, 2024 17:26
@thesan thesan force-pushed the fix/llm-stacks-memo-too-long branch from e71286f to 99476d0 Compare December 5, 2024 18:49
@thesan thesan requested a review from ComradeAERGO December 6, 2024 10:15
@thesan thesan merged commit dfe2636 into develop Dec 6, 2024
55 checks passed
@thesan thesan deleted the fix/llm-stacks-memo-too-long branch December 6, 2024 12:10
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 mobile Has changes in LLM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants