CW-1523-AnyPay Redesign (#3383)

* feat: Add network selector and compatible networks screen to send page for EVMs

* feat: add redesigned payanything flow and handle cases for evms, solana and tron

* feat: adding the swap part to the entire flow

* refactor: update navigation and error handling in send and swap flows

* adjust structuring and use the chain badge icons, also fix crypto and currency values not consistent on single network picker

* fix: modify guard for non-evm chains and minor cleanup

* use multipicker layout for receive section, streamline send to available balances and adjust colors as needed

* handle btc case for picker, update style and images across

* fix all pending issues with scanning qr and network handling for both evm and non evm, plus token and amount resolving

* fix all pending issues with scanning qr and network handling for both evm and non evm, plus token and amount resolving

* fix: expand fetch for tokens across networks and fix other issues regarding scanning from homepage

* auto-reformat

* fix conflict

* handle evm qr scan from homepage and add guards for swap and switch flows

* chore: Cleanup

* chore: set estimated fee to 0 when switching wallet

* fix merge conflicts

* fix to review comments and reformatting for lints

* fix: root cause for token bug reported

* chore: cleanup

* feat: add improved anypay swap screen which focuses on the receive amount
fix: fiat input toggle erro (also present on prod)
reformat: anypay related widgets

* feat: add alert for unsupported networks in payment requests

* fix: prevent rate and provider from showing until amount is calculated and loaded
fix: remove send icon in rate widget and align to center
fix: adjust network badge in swap confirm widget

* feat: embed tokens for solana and tron in QR generated for swap from external

* test: add unit tests for Tron, Solana, and ERC681 URI handling and detection

* fix: review comments

* fix: handle more edgecases

* feat: enhance ERC681URI to support raw token amounts and decimals

* refactor: streamline EVM chain ID retrieval in send page and recipient network row

* fix: minor review comments

---------

Co-authored-by: Robert Malikowski <malikowskirobert@gmail.com>
This commit is contained in:
David Adegoke
2026-08-11 02:16:12 +02:00
committed by GitHub
co-authored by Robert Malikowski
parent 931b6fb9d2
commit 90194f7136
69 changed files with 4534 additions and 2682 deletions
@@ -381,7 +381,7 @@ class _TokenSelectionContentState extends State<_TokenSelectionContent> {
detectedWalletType: WalletType.solana,
detectedCurrency: selectedToken!,
isValid: true,
amount: widget.paymentRequest.amount,
amount: widget.paymentRequest.resolveTokenAmount(selectedToken!),
note: widget.paymentRequest.note,
scheme: widget.paymentRequest.scheme,
pjUri: widget.paymentRequest.pjUri,
@@ -398,7 +398,7 @@ class _TokenSelectionContentState extends State<_TokenSelectionContent> {
detectedWalletType: WalletType.tron,
detectedCurrency: selectedToken!,
isValid: true,
amount: widget.paymentRequest.amount,
amount: widget.paymentRequest.resolveTokenAmount(selectedToken!),
note: widget.paymentRequest.note,
scheme: widget.paymentRequest.scheme,
pjUri: widget.paymentRequest.pjUri,
@@ -415,7 +415,7 @@ class _TokenSelectionContentState extends State<_TokenSelectionContent> {
detectedWalletType: selectedNetwork!,
detectedCurrency: selectedToken!,
isValid: true,
amount: widget.paymentRequest.amount,
amount: widget.paymentRequest.resolveTokenAmount(selectedToken!),
note: widget.paymentRequest.note,
scheme: widget.paymentRequest.scheme,
pjUri: widget.paymentRequest.pjUri,
@@ -89,16 +89,28 @@ class ListItemRegularRowWidget extends StatelessWidget {
children: [
leadingIcon!,
Positioned(
right: -3,
bottom: -3,
child: CakeImageWidget(
imageUrl: badgeIconPath!,
width: badgeIconSize ?? 10,
height: badgeIconSize ?? 10,
errorWidget: leadingIconErrorWidget,
colorFilter: iconColor == null
? null
: ColorFilter.mode(iconColor!, BlendMode.srcIn),
right: -2,
bottom: -2,
child: Container(
width: 16,
height: 16,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6),
border: Border.all(
color: theme.colorScheme.surfaceContainerHigh,
width: 2,
),
color: theme.colorScheme.onSurface,
),
padding: const EdgeInsets.all(2),
child: CakeImageWidget(
imageUrl: badgeIconPath!,
width: badgeIconSize ?? 12,
height: badgeIconSize ?? 12,
fit: BoxFit.cover,
color: theme.colorScheme.surface,
errorWidget: leadingIconErrorWidget,
),
),
),
],