Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(suite): show gas price before staking amount is provided #16092

Merged
merged 1 commit into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ export const ClaimModal = ({ onCancel }: ClaimModalModalProps) => {
composedLevels={composedLevels}
changeFeeLevel={changeFeeLevel}
helperText={<Translation id="TR_STAKE_PAID_FROM_BALANCE" />}
showFeeWhilePending={true}
/>
</Card>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export const StakeEthForm = () => {
composedLevels={composedLevels}
changeFeeLevel={changeFeeLevel}
helperText={<Translation id="TR_STAKE_PAID_FROM_BALANCE" />}
showFeeWhilePending={false}
/>
</Card>
</Column>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const UnstakeFees = () => {
composedLevels={composedLevels}
changeFeeLevel={changeFeeLevel}
helperText={<Translation id="TR_STAKE_PAID_FROM_BALANCE" />}
showFeeWhilePending={false}
/>
</StyledCard>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ export const UnstakeEthForm = () => {
composedLevels={composedLevels}
changeFeeLevel={changeFeeLevel}
helperText={<Translation id="TR_STAKE_PAID_FROM_BALANCE" />}
showFeeWhilePending={false}
/>
</Card>

Expand Down
7 changes: 2 additions & 5 deletions packages/suite/src/components/wallet/Fees/Fees.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export interface FeesProps<TFieldValues extends FormState> {
label?: TranslationKey;
rbfForm?: boolean;
helperText?: React.ReactNode;
showFeeWhilePending?: boolean;
}

export const Fees = <TFieldValues extends FormState>({
Expand All @@ -79,7 +78,6 @@ export const Fees = <TFieldValues extends FormState>({
label,
rbfForm,
helperText,
showFeeWhilePending = true,
...props
}: FeesProps<TFieldValues>) => {
// Type assertion allowing to make the component reusable, see https://stackoverflow.com/a/73624072.
Expand All @@ -95,8 +93,7 @@ export const Fees = <TFieldValues extends FormState>({
// Solana has only `normal` fee level, so we do not display any feeOptions since there is nothing to choose from
const feeOptions = networkType === 'solana' ? [] : buildFeeOptions(feeInfo.levels);

const showNormalFee = showFeeWhilePending || transactionInfo?.type === 'final';
const shouldAnimateNormalFee = showNormalFee && !isCustomLevel;
const shouldAnimateNormalFee = !isCustomLevel;

return (
<Column gap={spacings.xs}>
Expand Down Expand Up @@ -164,7 +161,7 @@ export const Fees = <TFieldValues extends FormState>({
feeInfo={feeInfo}
selectedLevel={selectedLevel}
transactionInfo={transactionInfo}
showFee={showNormalFee}
showFee={true}
/>
</motion.div>
)}
Expand Down
Loading