From 0b4e52c5f9ab5dd6fd9165b1453775f91d6e560b Mon Sep 17 00:00:00 2001 From: David Adegoke <64401859+Blazebrain@users.noreply.github.com> Date: Wed, 3 Jun 2026 16:01:38 +0100 Subject: [PATCH] refactor: token image updates (#3287) * Improve token image display with mask and background * Enhance token image bg and remove wierd halo effect that was showing, also add token bg to disclaimer and picker * Add token bg to more locations and give another shot at halo * fix: halo around token images * add token background to non-transparent images only * another shot at bg based on transparency * refactor: enhance token image widget shape handling and add filter quality option to cake image widget * fix: another shot * refactor: update token image shape handling for svg, no need to clip * fix: bnb wallet image not displaying on receive token display --- lib/new-ui/widgets/coins_page/token_image_widget.dart | 2 +- lib/new-ui/widgets/receive_page/receive_token_display.dart | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/new-ui/widgets/coins_page/token_image_widget.dart b/lib/new-ui/widgets/coins_page/token_image_widget.dart index 50e89411f..fe2f9e0c9 100644 --- a/lib/new-ui/widgets/coins_page/token_image_widget.dart +++ b/lib/new-ui/widgets/coins_page/token_image_widget.dart @@ -65,7 +65,7 @@ class _TokenImageWidgetState extends State { } Future<_IconShape> _analyzeShape(String url) async { - if (url.toLowerCase().endsWith('.svg')) return _IconShape.clipOnly; + if (url.toLowerCase().endsWith('.svg')) return _IconShape.alreadyCircular; final ImageProvider provider; if (url.startsWith('assets/')) { diff --git a/lib/new-ui/widgets/receive_page/receive_token_display.dart b/lib/new-ui/widgets/receive_page/receive_token_display.dart index 64d20d4ec..f4bebe3a0 100644 --- a/lib/new-ui/widgets/receive_page/receive_token_display.dart +++ b/lib/new-ui/widgets/receive_page/receive_token_display.dart @@ -33,8 +33,9 @@ class ReceiveTokenDisplay extends StatelessWidget { child: Row( spacing:4, children: [ - CakeImageWidget(imageUrl: - "assets/new-ui/chain_badges/${walletTypeToString(addressListViewModel.wallet.type).toLowerCase()}.svg", + CakeImageWidget( + imageUrl: + "assets/new-ui/chain_badges/${addressListViewModel.wallet.type == WalletType.bsc ? 'bnb' : walletTypeToString(addressListViewModel.wallet.type).toLowerCase()}.svg", width: 16, height: 16, colorFilter: ColorFilter.mode(