diff --git a/lib/features/wallet_screen/non_native_token_screen/presentation/widgets/poscan_asset_metadata_section.dart b/lib/features/wallet_screen/non_native_token_screen/presentation/widgets/poscan_asset_metadata_section.dart index b38b5622..ed84e823 100644 --- a/lib/features/wallet_screen/non_native_token_screen/presentation/widgets/poscan_asset_metadata_section.dart +++ b/lib/features/wallet_screen/non_native_token_screen/presentation/widgets/poscan_asset_metadata_section.dart @@ -1,6 +1,8 @@ import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:threedpass/core/polkawallet/bloc/app_service_cubit.dart'; import 'package:threedpass/core/widgets/buttons/elevated_button.dart'; import 'package:threedpass/core/widgets/other/fast_rich_text.dart'; import 'package:threedpass/core/widgets/paddings.dart'; @@ -28,18 +30,26 @@ class PoscanAssetMetadataSection extends StatelessWidget { @override Widget build(final BuildContext context) { if (metadata == null) { - return Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const D3pBodyMediumText('poscan_asset_page_metadata_help'), - const SizedBoxH8(), - D3pElevatedButton( - text: 'poscan_asset_page_metadata_button_label'.tr(), - onPressed: () => onPressed(context), - ), - ], - ); + final account = BlocProvider.of(context) + .state + .keyring + .current; // TODO Change this for read-only mode + if (poscanAssetData.owner == account.address) { + return Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const D3pBodyMediumText('poscan_asset_page_metadata_help'), + const SizedBoxH8(), + D3pElevatedButton( + text: 'poscan_asset_page_metadata_button_label'.tr(), + onPressed: () => onPressed(context), + ), + ], + ); + } else { + return D3pBodyMediumText('No metadata set for this asset'); + } } else { final children = [ FastRichText( diff --git a/pubspec.yaml b/pubspec.yaml index 72a9c36c..010293b6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -10,7 +10,7 @@ publish_to: 'none' # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 2.14.0+36 +version: 2.14.1+37 environment: sdk: ">=3.0.6 <3.0.7"