Skip to content

Commit

Permalink
feat: add warning message for inclusion fees.
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitdevos committed Jun 7, 2024
1 parent c5b521c commit 7b01d64
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/TransactionStatusCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function TransactionStatusCellDetails(props: StatusCellProps) {
<Detail label="Description" value="This transaction has been executed." />
</Col>
<Col style={{width: "50%"}}>
<Detail label="Fees (LGNT)" value={ <EstimatedFees fees={ toFeesClass(props.transaction.fees) } hideTitle={ true } /> } />
<Detail label="Fees (LGNT)" value={ <EstimatedFees fees={ toFeesClass(props.transaction.fees) } hideTitle={ true } hideNetworkLoadWarning={ true }/> } />
</Col>
</>
);
Expand Down
2 changes: 2 additions & 0 deletions src/loc/fees/EstimatedFees.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export interface Props {
centered?: boolean;
inclusionFeePaidBy?: string;
otherFeesPaidBy?: string;
hideNetworkLoadWarning?: boolean;
}

export default function EstimatedFees(props: Props) {
Expand Down Expand Up @@ -39,6 +40,7 @@ export default function EstimatedFees(props: Props) {
/>
</td>
{ showPaidBy && <td>{ props.inclusionFeePaidBy || "" }</td> }
{ props.hideNetworkLoadWarning !== true && <td>(can be impacted by network load)</td> }
</tr>
{ fees?.storageFee !== undefined &&
<tr>
Expand Down
15 changes: 15 additions & 0 deletions src/loc/fees/__snapshots__/EstimatedFees.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ exports[`EstimatedFees renders fees with certificate 1`] = `
}
/>
</td>
<td>
(can be impacted by network load)
</td>
</tr>
<tr>
<td>
Expand Down Expand Up @@ -109,6 +112,9 @@ exports[`EstimatedFees renders fees with legal 1`] = `
}
/>
</td>
<td>
(can be impacted by network load)
</td>
</tr>
<tr>
<td>
Expand Down Expand Up @@ -188,6 +194,9 @@ exports[`EstimatedFees renders fees with storage 1`] = `
}
/>
</td>
<td>
(can be impacted by network load)
</td>
</tr>
<tr>
<td>
Expand Down Expand Up @@ -270,6 +279,9 @@ exports[`EstimatedFees renders fees with storage and paid by 1`] = `
<td>
paid by the Legal Officer
</td>
<td>
(can be impacted by network load)
</td>
</tr>
<tr>
<td>
Expand Down Expand Up @@ -353,6 +365,9 @@ exports[`EstimatedFees renders fees without storage 1`] = `
}
/>
</td>
<td>
(can be impacted by network load)
</td>
</tr>
<tr>
<td>
Expand Down

0 comments on commit 7b01d64

Please sign in to comment.