Skip to content

Commit

Permalink
feat(logo)
Browse files Browse the repository at this point in the history
- open viewblock
  • Loading branch information
thiagocarvalhodev committed Dec 18, 2024
1 parent 835db6d commit f5bc1af
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'package:ardrive/services/ethereum/provider/ethereum_provider_wallet.dart
import 'package:ardrive/user/name/presentation/bloc/profile_name_bloc.dart';
import 'package:ardrive/utils/app_localizations_wrapper.dart';
import 'package:ardrive/utils/logger.dart';
import 'package:ardrive/utils/open_view_block.dart';
import 'package:ardrive/utils/plausible_event_tracker/plausible_event_tracker.dart';
import 'package:ardrive/utils/show_general_dialog.dart';
import 'package:ardrive_ui/ardrive_ui.dart';
Expand Down Expand Up @@ -155,7 +156,9 @@ class _EnterYourPasswordWidgetState extends State<EnterYourPasswordWidget> {
if (state is ProfileNameLoaded) {
return ProfileCardHeader(
walletAddress: state.walletAddress,
onPressed: () {},
onPressed: () {
openViewBlockWallet(state.walletAddress);
},
isExpanded: true,
hasLogoutButton: true,
logoutTooltip: 'Forget wallet',
Expand All @@ -169,7 +172,11 @@ class _EnterYourPasswordWidgetState extends State<EnterYourPasswordWidget> {

return ProfileCardHeader(
walletAddress: state.walletAddress ?? '',
onPressed: () {},
onPressed: () {
if (state.walletAddress != null) {
openViewBlockWallet(state.walletAddress!);
}
},
isExpanded: true,
hasLogoutButton: true,
logoutTooltip: 'Forget wallet',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'package:ardrive/services/ethereum/provider/ethereum_provider_wallet.dart
import 'package:ardrive/user/name/presentation/bloc/profile_name_bloc.dart';
import 'package:ardrive/utils/app_localizations_wrapper.dart';
import 'package:ardrive/utils/logger.dart';
import 'package:ardrive/utils/open_view_block.dart';
import 'package:ardrive/utils/plausible_event_tracker/plausible_event_tracker.dart';
import 'package:ardrive/utils/show_general_dialog.dart';
import 'package:ardrive_ui/ardrive_ui.dart';
Expand Down Expand Up @@ -115,7 +116,9 @@ class _SecureYourWalletWidgetState extends State<SecureYourWalletWidget> {
if (state is ProfileNameLoaded) {
return ProfileCardHeader(
walletAddress: state.walletAddress,
onPressed: () {},
onPressed: () {
openViewBlockWallet(state.walletAddress);
},
isExpanded: true,
hasLogoutButton: true,
logoutTooltip: 'Forget wallet',
Expand All @@ -129,7 +132,11 @@ class _SecureYourWalletWidgetState extends State<SecureYourWalletWidget> {

return ProfileCardHeader(
walletAddress: state.walletAddress ?? '',
onPressed: () {},
onPressed: () {
if (state.walletAddress != null) {
openViewBlockWallet(state.walletAddress!);
}
},
isExpanded: true,
hasLogoutButton: true,
logoutTooltip: 'Forget wallet',
Expand Down
5 changes: 5 additions & 0 deletions lib/utils/open_view_block.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import 'package:ardrive/utils/open_url.dart';

void openViewBlockWallet(String walletAddress) {
openUrl(url: 'https://viewblock.io/arweave/address/$walletAddress');
}

0 comments on commit f5bc1af

Please sign in to comment.