Skip to content

Commit 5214b75

Browse files
committed
feat: add specific StepSummaryAdditionalRows to StepSummary in LLD
1 parent 065ff63 commit 5214b75

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

apps/ledger-live-desktop/src/renderer/families/types.ts

+10
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,16 @@ export type LLDCoinFamily<
292292
*/
293293
StepSummaryNetworkFeesRow?: React.ComponentType<SummaryNetworkFeesRowProps>;
294294

295+
/**
296+
* Allow to add specific component in Send modal at the end of Summary Step
297+
*/
298+
StepSummaryAdditionalRows?: React.ComponentType<{
299+
account: A | SubAccount;
300+
parentAccount: A | null | undefined;
301+
transaction: T;
302+
status: TS;
303+
}>;
304+
295305
/**
296306
* It was for Hedera specifc, when we do not find any account it show a specific component
297307
*/

apps/ledger-live-desktop/src/renderer/modals/Send/steps/StepSummary.tsx

+10
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ const StepSummary = (props: StepProps) => {
7777

7878
const specific = currency ? getLLDCoinFamily(mainAccount.currency.family) : null;
7979
const SpecificSummaryNetworkFeesRow = specific?.StepSummaryNetworkFeesRow;
80+
const SpecificSummaryAdditionalRows = specific?.StepSummaryAdditionalRows;
8081

8182
const memo = "memo" in transaction ? transaction.memo : undefined;
8283

@@ -260,6 +261,15 @@ const StepSummary = (props: StepProps) => {
260261
</>
261262
)}
262263

264+
{!!SpecificSummaryAdditionalRows && (
265+
<SpecificSummaryAdditionalRows
266+
account={account}
267+
parentAccount={parentAccount}
268+
transaction={transaction}
269+
status={status}
270+
/>
271+
)}
272+
263273
{!totalSpent.eq(amount) ? (
264274
<>
265275
<Separator />

0 commit comments

Comments
 (0)