Skip to content

Commit

Permalink
fix(llm): use React Native inputs maxLength instead of custom funct…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
thesan committed Dec 5, 2024
1 parent 00f27ef commit 8fb32ec
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ import React from "react";
import type { Transaction as CardanoTransaction } from "@ledgerhq/live-common/families/cardano/types";
import type { MemoTagInputProps } from "LLM/features/MemoTag/types";
import { GenericMemoTagInput } from "LLM/features/MemoTag/components/GenericMemoTagInput";
import { truncateUtf8 } from "LLM/utils/truncateUtf8";

export default (props: MemoTagInputProps<CardanoTransaction>) => (
<GenericMemoTagInput
{...props}
textToValue={text => truncateUtf8(text, MAX_MEMO_LENGTH)}
maxLength={MAX_MEMO_LENGTH}
valueToTxPatch={value => tx => ({ ...tx, memo: value || undefined })}
/>
);
Expand Down

0 comments on commit 8fb32ec

Please sign in to comment.