mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-02 12:14:09 +01:00
CW-1130-deuro-fixes-improvements (#2392)
* feat: add support for Ethereum EIP-681 URIs in PaymentRequest and implement test coverage * test: add unit test for EIP-681 URI handling with contract and no chainId [skip-ci] * fix(CW-1114): rounding error for really large numbers * fix: wrong decimals for eth fee display * fix: limit fractional digits to a maximum of `decimals` in `format_fixed` function [skip-ci] * test: add unit tests for `formatFixed` function * refactor: replace custom balance formatting with `formatFixed` utility function * refactor: improve dEuroViewModel formatting and computation logic * refactor: extract and simplify interest action handlers in dEuro savings page * fix: deuro add should show edit Add bottom sheet * feat: block user from entering amount bigger than the max * feat: use new tooltip bottomsheet for dEuro * feat: add pull down to refresh dEuro savings --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
co-authored by
Omar Hatem
parent
b6a7dde8e4
commit
43f2225e0c
@@ -0,0 +1,46 @@
|
||||
import 'package:auto_size_text/auto_size_text.dart';
|
||||
import 'package:cake_wallet/src/widgets/bottom_sheet/base_bottom_sheet_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TooltipSheet extends BaseBottomSheet {
|
||||
final String tooltip;
|
||||
|
||||
const TooltipSheet({
|
||||
required super.currentTheme,
|
||||
required super.titleText,
|
||||
super.titleIconPath,
|
||||
required this.tooltip,
|
||||
required super.footerType,
|
||||
super.maxHeight = 900,
|
||||
super.singleActionButtonText,
|
||||
super.onSingleActionButtonPressed,
|
||||
super.singleActionButtonKey,
|
||||
super.doubleActionLeftButtonText,
|
||||
super.doubleActionRightButtonText,
|
||||
super.onLeftActionButtonPressed,
|
||||
super.onRightActionButtonPressed,
|
||||
super.leftActionButtonKey,
|
||||
super.rightActionButtonKey,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget contentWidget(BuildContext context) => Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
color: Theme.of(context).colorScheme.surfaceContainer),
|
||||
margin: const EdgeInsets.all(12),
|
||||
padding: const EdgeInsets.all(12),
|
||||
child: AutoSizeText(
|
||||
tooltip,
|
||||
textAlign: TextAlign.center,
|
||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
decoration: TextDecoration.none,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Widget footerWidget(BuildContext context) => SizedBox.shrink();
|
||||
}
|
||||
Reference in New Issue
Block a user