Skip to content

Commit

Permalink
fix(llm): 🚦 do not validate empty Stellar memos (#8667)
Browse files Browse the repository at this point in the history
* fix(llm): do not validate empty Stellar memos

* fix(llm): set memo type to `NO_MEMO` for empty values
  • Loading branch information
thesan authored Dec 12, 2024
1 parent 4b8e87d commit fa5d5a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/small-jokes-work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"live-mobile": minor
---

Remove invalid format error for Stellar empty hash and return type memo
5 changes: 3 additions & 2 deletions apps/ledger-live-mobile/src/families/stellar/MemoTagInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ export default ({ onChange, ...inputProps }: MemoTagInputProps<StellarTransactio
const [isOpen, setIsOpen] = useState(false);

const handleChange = (type: MemoType, value: string) => {
const error = isMemoValid(type, value) ? undefined : new StellarWrongMemoFormat();
const patch = (tx: StellarTransaction) => ({ ...tx, memoType: type, memoValue: value });
const error = !value || isMemoValid(type, value) ? undefined : new StellarWrongMemoFormat();
const memoType = !value ? "NO_MEMO" : type;
const patch = (tx: StellarTransaction) => ({ ...tx, memoType, memoValue: value });
onChange({ value, patch, error });
};

Expand Down

0 comments on commit fa5d5a3

Please sign in to comment.