Skip to content

Commit

Permalink
chore: 💄 Fees - Reduce decimal
Browse files Browse the repository at this point in the history
  • Loading branch information
redDwarf03 committed Oct 21, 2024
1 parent 7535a3f commit a6979da
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ class FarmLockClaimConfirmSheetState
AmountFormatters.standardSmallValue(
farmLockClaim.feesEstimatedUCO,
'UCO',
decimal: 3,
),
style: AppTextStyles.bodyMedium(context),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ class FarmLockDepositConfirmSheetState
AmountFormatters.standardSmallValue(
farmLockDeposit.feesEstimatedUCO,
'UCO',
decimal: 3,
),
style: AppTextStyles.bodyMedium(context),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ class FarmLockLevelUpConfirmSheetState
AmountFormatters.standardSmallValue(
farmLockLevelUp.feesEstimatedUCO,
'UCO',
decimal: 3,
),
style: AppTextStyles.bodyMedium(context),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ class FarmLockWithdrawConfirmSheetState
AmountFormatters.standardSmallValue(
farmLockWithdraw.feesEstimatedUCO,
'UCO',
decimal: 3,
),
style: AppTextStyles.bodyMedium(context),
),
Expand Down
16 changes: 10 additions & 6 deletions lib/ui/views/aeswap_liquidity_add/bloc/provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -473,11 +473,12 @@ class LiquidityAddFormNotifier extends _$LiquidityAddFormNotifier {
state.token2Amount,
state.slippageTolerance,
);
state = state.copyWith(calculationInProgress: false);
state = state.copyWith(
calculationInProgress: false,
feesEstimatedUCO: feesEstimatedUCO,
);
}
state = state.copyWith(
feesEstimatedUCO: feesEstimatedUCO,
);

if (feesEstimatedUCO > 0) {
if (state.token1Amount + feesEstimatedUCO > state.token1Balance) {
final adjustedAmount = state.token1Balance - feesEstimatedUCO;
Expand All @@ -502,9 +503,12 @@ class LiquidityAddFormNotifier extends _$LiquidityAddFormNotifier {
state.token2Amount,
state.slippageTolerance,
);
state = state.copyWith(calculationInProgress: false);
state = state.copyWith(
calculationInProgress: false,
feesEstimatedUCO: feesEstimatedUCO,
);
}
state = state.copyWith(feesEstimatedUCO: feesEstimatedUCO);

if (feesEstimatedUCO > 0) {
if (state.token2Amount + feesEstimatedUCO > state.token2Balance) {
final adjustedAmount = state.token2Balance - feesEstimatedUCO;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ class LiquidityAddConfirmFormSheetState
AmountFormatters.standardSmallValue(
liquidityAdd.feesEstimatedUCO,
'UCO',
decimal: 3,
),
style: AppTextStyles.bodyMedium(context),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ class LiquidityRemoveConfirmFormSheetState
AmountFormatters.standardSmallValue(
liquidityRemove.feesEstimatedUCO,
'UCO',
decimal: 3,
),
style: AppTextStyles.bodyMedium(context),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ class SwapConfirmFormSheetState extends ConsumerState<SwapConfirmFormSheet>
AmountFormatters.standardSmallValue(
swap.feesEstimatedUCO,
'UCO',
decimal: 3,
),
style: AppTextStyles.bodyMedium(context),
),
Expand Down

0 comments on commit a6979da

Please sign in to comment.