Skip to content

Commit

Permalink
fix: Overflow issue in blockchain accounts list
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed Jul 3, 2024
1 parent 2d95316 commit 2dd14c5
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class ManageAccountsItem extends StatelessWidget {
return BackgroundCard(
child: Container(
margin: const EdgeInsets.only(bottom: Sizes.spaceSmall),
padding: const EdgeInsets.symmetric(horizontal: Sizes.spaceSmall),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
Expand Down Expand Up @@ -114,50 +113,51 @@ class ManageAccountsItem extends StatelessWidget {
Row(
mainAxisSize: MainAxisSize.min,
children: [
SeeAddressButton(
onTap: () {
Navigator.of(context).push<void>(
AccountPublicAddressPage.route(
accountName: accountName,
accountAddress: cryptoAccountData.walletAddress,
),
);
},
Expanded(
child: SeeAddressButton(
onTap: () {
Navigator.of(context).push<void>(
AccountPublicAddressPage.route(
accountName: accountName,
accountAddress: cryptoAccountData.walletAddress,
),
);
},
),
),
const SizedBox(width: Sizes.spaceSmall),
RevealPrivateKeyButton(
onTap: () async {
final confirm = await showDialog<bool>(
context: context,
builder: (context) => ConfirmDialog(
title: l10n.warningDialogTitle,
subtitle: l10n.accountPrivateKeyAlert,
yes: l10n.showDialogYes,
no: l10n.showDialogNo,
),
) ??
false;

if (confirm) {
await securityCheck(
context: context,
localAuthApi: LocalAuthApi(),
onSuccess: () {
Navigator.of(context).push<void>(
AccountPrivateKeyPage.route(
privateKey: cryptoAccountData.secretKey,
Expanded(
child: RevealPrivateKeyButton(
onTap: () async {
final confirm = await showDialog<bool>(
context: context,
builder: (context) => ConfirmDialog(
title: l10n.warningDialogTitle,
subtitle: l10n.accountPrivateKeyAlert,
yes: l10n.showDialogYes,
no: l10n.showDialogNo,
),
);
},
);
}
},
) ??
false;

if (confirm) {
await securityCheck(
context: context,
localAuthApi: LocalAuthApi(),
onSuccess: () {
Navigator.of(context).push<void>(
AccountPrivateKeyPage.route(
privateKey: cryptoAccountData.secretKey,
),
);
},
);
}
},
),
),
],
),
const SizedBox(
height: Sizes.spaceSmall,
),
],
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ class RevealPrivateKeyButton extends StatelessWidget {
width: Sizes.icon,
color: Theme.of(context).colorScheme.onSurface,
),
Text(
l10n.revealPrivateKey.toUpperCase(),
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onSurface,
),
Expanded(
child: MyText(
l10n.revealPrivateKey.toUpperCase(),
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onSurface,
),
),
),
],
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ class SeeAddressButton extends StatelessWidget {
color: Theme.of(context).colorScheme.onPrimaryContainer,
),
),
Text(
l10n.seeAddress.toUpperCase(),
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onPrimaryContainer,
),
Expanded(
child: MyText(
l10n.seeAddress.toUpperCase(),
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onPrimaryContainer,
),
),
),
],
),
Expand Down

0 comments on commit 2dd14c5

Please sign in to comment.