-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(llm): 🔧 memo input on the send flow of Solana (#8201)
* fix(llm): solana memo tag send flow * chore: update change log
- Loading branch information
Showing
17 changed files
with
53 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"live-mobile": patch | ||
--- | ||
|
||
Fix the memo on the Solana send flow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 7 additions & 4 deletions
11
apps/ledger-live-mobile/src/families/solana/MemoTagInput.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
import merge from "lodash/merge"; | ||
import React from "react"; | ||
|
||
import { Transaction as SolanaTransaction } from "@ledgerhq/live-common/generated/types"; | ||
import { Transaction as SolanaTransaction } from "@ledgerhq/live-common/families/solana/types"; | ||
import type { MemoTagInputProps } from "LLM/features/MemoTag/types"; | ||
import { GenericMemoTagInput } from "LLM/features/MemoTag/components/GenericMemoTagInput"; | ||
|
||
export default (props: MemoTagInputProps) => ( | ||
<GenericMemoTagInput<SolanaTransaction> | ||
export default (props: MemoTagInputProps<SolanaTransaction>) => ( | ||
<GenericMemoTagInput | ||
{...props} | ||
valueToTxPatch={value => ({ memo: value || undefined })} | ||
valueToTxPatch={value => tx => | ||
merge({}, tx, { model: { uiState: { memo: value || undefined } } }) | ||
} | ||
/> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
import type { Transaction } from "@ledgerhq/live-common/generated/types"; | ||
import type { AnimatedInputProps } from "@ledgerhq/native-ui/components/Form/Input/AnimatedInput"; | ||
|
||
export type TxPatch<T extends Transaction> = (tx: T) => T; | ||
|
||
export type MemoTagInputProps<T extends Transaction = Transaction> = Omit< | ||
AnimatedInputProps, | ||
"value" | "onChangeText" | "onChange" | ||
> & { onChange: (update: { patch: Partial<T>; value: string; error?: Error }) => void }; | ||
> & { onChange: (update: { patch: TxPatch<T>; value: string; error?: Error }) => void }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters