Skip to content
Draft
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
52 changes: 30 additions & 22 deletions lib/pages/receive_view/receive_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import '../../wallets/wallet/wallet_mixin_interfaces/multi_address_interface.dar
import '../../wallets/wallet/wallet_mixin_interfaces/mweb_interface.dart';
import '../../wallets/wallet/wallet_mixin_interfaces/spark_interface.dart';
import '../../wallets/wallet/wallet_mixin_interfaces/view_only_option_interface.dart';
import '../../widgets/address_label_editor.dart';
import '../../widgets/background.dart';
import '../../widgets/conditional_parent.dart';
import '../../widgets/custom_buttons/app_bar_icon_button.dart';
Expand Down Expand Up @@ -161,8 +162,7 @@ class _ReceiveViewState extends ConsumerState<ReceiveView> {

if (slatepackString == null) return;
if (mounted) {
final wallet =
ref.read(pWallets).getWallet(walletId) as EpiccashWallet;
final wallet = ref.read(pWallets).getWallet(walletId) as EpiccashWallet;

Exception? ex;
final result = await showLoading(
Expand Down Expand Up @@ -226,9 +226,10 @@ class _ReceiveViewState extends ConsumerState<ReceiveView> {
return WillPopScope(
onWillPop: () async => shouldPop,
child: Container(
color: Theme.of(
context,
).extension<StackColors>()!.overlay.withOpacity(0.5),
color: Theme.of(context)
.extension<StackColors>()!
.overlay
.withOpacity(0.5),
child: const CustomLoadingOverlay(
message: "Generating address",
eventBus: null,
Expand Down Expand Up @@ -285,9 +286,8 @@ class _ReceiveViewState extends ConsumerState<ReceiveView> {
shouldPop = true;

if (mounted) {
Navigator.of(
context,
).popUntil(ModalRoute.withName(ReceiveView.routeName));
Navigator.of(context)
.popUntil(ModalRoute.withName(ReceiveView.routeName));

setState(() {
_addressMap[_walletAddressTypes[_currentIndex]] =
Expand All @@ -308,9 +308,10 @@ class _ReceiveViewState extends ConsumerState<ReceiveView> {
return WillPopScope(
onWillPop: () async => shouldPop,
child: Container(
color: Theme.of(
context,
).extension<StackColors>()!.overlay.withOpacity(0.5),
color: Theme.of(context)
.extension<StackColors>()!
.overlay
.withOpacity(0.5),
child: const CustomLoadingOverlay(
message: "Generating address",
eventBus: null,
Expand Down Expand Up @@ -553,17 +554,16 @@ class _ReceiveViewState extends ConsumerState<ReceiveView> {
child: AspectRatio(
aspectRatio: 1,
child: AppBarIconButton(
semanticsLabel:
"Address List Pop-up Button. Opens A Pop-up For Address List Button.",
semanticsLabel: "Address List Pop-up Button. Opens A Pop-up For Address List Button.",
key: const Key("walletNetworkSettingsAddNewNodeViewButton"),
size: 36,
shadows: const [],
color: Theme.of(context).extension<StackColors>()!.background,
icon: SvgPicture.asset(
Assets.svg.verticalEllipsis,
color: Theme.of(
context,
).extension<StackColors>()!.accentColorDark,
color: Theme.of(context)
.extension<StackColors>()!
.accentColorDark,
width: 20,
height: 20,
),
Expand All @@ -580,9 +580,9 @@ class _ReceiveViewState extends ConsumerState<ReceiveView> {
right: 10,
child: Container(
decoration: BoxDecoration(
color: Theme.of(
context,
).extension<StackColors>()!.popupBG,
color: Theme.of(context)
.extension<StackColors>()!
.popupBG,
borderRadius: BorderRadius.circular(
Constants.size.circularBorderRadius,
),
Expand Down Expand Up @@ -651,9 +651,9 @@ class _ReceiveViewState extends ConsumerState<ReceiveView> {
Text(
"Address type",
style: STextStyles.w500_14(context).copyWith(
color: Theme.of(
context,
).extension<StackColors>()!.infoItemLabel,
color: Theme.of(context)
.extension<StackColors>()!
.infoItemLabel,
),
),
const SizedBox(height: 10),
Expand Down Expand Up @@ -792,6 +792,14 @@ class _ReceiveViewState extends ConsumerState<ReceiveView> {
),
),
const SizedBox(height: 12),
RoundedWhiteContainer(
child: AddressLabelEditor(
walletId: walletId,
address: address,
isDesktop: false,
),
),
const SizedBox(height: 12),
PrimaryButton(
label: "Copy address",
onPressed: () {
Expand Down
Loading
Loading