From de801c44040937153ef67132f5fe78b7397e6fea Mon Sep 17 00:00:00 2001 From: CharlVS <77973576+CharlVS@users.noreply.github.com> Date: Mon, 16 Dec 2024 19:02:54 +0100 Subject: [PATCH] Amend previous commit Amend the previous commit with minor tweaks --- .../example/lib/screens/asset_page.dart | 14 +------------- .../lib/src/assets/asset_pubkey_extensions.dart | 2 +- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/packages/komodo_defi_sdk/example/lib/screens/asset_page.dart b/packages/komodo_defi_sdk/example/lib/screens/asset_page.dart index 2b8ce6d..a5c19f8 100644 --- a/packages/komodo_defi_sdk/example/lib/screens/asset_page.dart +++ b/packages/komodo_defi_sdk/example/lib/screens/asset_page.dart @@ -60,7 +60,7 @@ class _AssetPageState extends State { Set? _cantCreateNewAddressReasons; Future _refreshUnavailableReasons() async { - final reasons = await widget.asset.getCantCreateNewAddressReasons(); + final reasons = await widget.asset.getCantCreateNewAddressReasons(_sdk); setState(() => _cantCreateNewAddressReasons = reasons); } @@ -266,18 +266,6 @@ class _AddressesSection extends StatelessWidget { const Text('Addresses'), Tooltip( message: tooltipMessage, - // textStyle: const TextStyle( - // color: Colors.white, - // fontSize: 14, - // ), - // decoration: BoxDecoration( - // color: Theme.of(context).colorScheme.inverseSurface, - // borderRadius: BorderRadius.circular(4), - // ), - // padding: const EdgeInsets.symmetric( - // horizontal: 16, - // vertical: 8, - // ), preferBelow: true, child: ElevatedButton.icon( onPressed: canCreateNewAddress ? onGenerateNewAddress : null, diff --git a/packages/komodo_defi_sdk/lib/src/assets/asset_pubkey_extensions.dart b/packages/komodo_defi_sdk/lib/src/assets/asset_pubkey_extensions.dart index 4c55e73..8d9f3ea 100644 --- a/packages/komodo_defi_sdk/lib/src/assets/asset_pubkey_extensions.dart +++ b/packages/komodo_defi_sdk/lib/src/assets/asset_pubkey_extensions.dart @@ -64,6 +64,6 @@ extension AssetHdWalletAddressesExtension on Asset { reasons.add(CantCreateNewAddressReason.maxGapLimitReached); } } - return reasons; + return reasons.isEmpty ? null : reasons; } }