CW-551-Refactor-EVM-Chains (#1256)

* feat: Create central package for EVM chains

* chore: Cleanup pubspec and add core evm dependencies

* feat: Replicated core evm chain files, time to start fixing the issues

* feat: Setup evm central package to handle all evm chains

* feat: Link up Polygon and Ethereum wallets to the centra evm package, fix bugs and issues, and optimze for better performance

* feat: Setup and adjust configs to reflect new evm configurations

* Remove unneeded file

* fix: Changes done while re-reviewing entire structure and refactor

* fix: Add evm chain wallet path to imports in configure file

* feat: Adjust implementation of parent class, remove unneeded files, remove windows, linux and mac directories, restructure the evm child classes

* fix: Make EVMChainWallet a central abstract class and adjust accordingly

* fix: Adjust transaction info, restructure EVMWalletChain to be an abstract, adjust external facing interfaces for polygon and ethereum, adjust configuration for ethereum and polygon in configure file

* fix: Testing issues

* fix: Add localization for nft tile and details page texts and add dashes for null responses

* fix: merge conflicts

* Minor fixes for building Monero.com

---------

Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
This commit is contained in:
Adegoke David
2024-01-30 20:01:48 +02:00
committed by GitHub
co-authored by OmarHatem
parent b92ccb5c0b
commit 7410daacff
90 changed files with 1775 additions and 2041 deletions
@@ -101,26 +101,26 @@ class NFTDetailsPage extends BasePage {
SizedBox(height: 16),
_NFTSingleInfoTile(
infoType: S.current.name,
infoValue: nftAsset.normalizedMetadata?.name ?? '',
infoValue: nftAsset.normalizedMetadata?.name ?? '---',
),
if (nftAsset.normalizedMetadata?.description != null) ...[
SizedBox(height: 16),
_NFTSingleInfoTile(
infoType: 'Description',
infoValue: nftAsset.normalizedMetadata?.description ?? '',
infoType: S.current.description,
infoValue: nftAsset.normalizedMetadata?.description ?? '---',
),
],
SizedBox(height: 16),
_NFTSingleInfoTile(
infoType: 'Contract Name',
infoValue: nftAsset.name ?? '',
infoType: S.current.contractName,
infoValue: nftAsset.name ?? '---',
),
SizedBox(height: 8),
_NFTSingleInfoTile(
infoType: 'Contract Symbol',
infoValue: nftAsset.symbol ?? '',
infoType: S.current.contractSymbol,
infoValue: nftAsset.symbol ?? '---',
),
],
),
@@ -13,22 +13,15 @@ class NFTTileWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return InkWell(
onTap: () => Navigator.pushNamed(context, Routes.nftDetailsPage,
arguments: nftAsset),
onTap: () => Navigator.pushNamed(context, Routes.nftDetailsPage, arguments: nftAsset),
child: Container(
width: double.infinity,
margin: const EdgeInsets.only(left: 16, right: 16),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30.0),
border: Border.all(
color: Theme.of(context)
.extension<BalancePageTheme>()!
.cardBorderColor,
width: 1,
),
color: Theme.of(context)
.extension<SyncIndicatorTheme>()!
.syncedBackgroundColor,
color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor, width: 1),
color: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
),
child: Row(
children: [
@@ -40,14 +33,10 @@ class NFTTileWidget extends StatelessWidget {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16.0),
border: Border.all(
color: Theme.of(context)
.extension<BalancePageTheme>()!
.cardBorderColor,
color: Theme.of(context).extension<BalancePageTheme>()!.cardBorderColor,
width: 1,
),
color: Theme.of(context)
.extension<SyncIndicatorTheme>()!
.syncedBackgroundColor,
color: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
),
child: NFTImageWidget(
imageUrl: nftAsset.normalizedMetadata?.imageUrl,
@@ -59,27 +48,23 @@ class NFTTileWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'${nftAsset.name ?? ''} - ${nftAsset.symbol ?? ''}',
'${nftAsset.name ?? '---'} - ${nftAsset.symbol ?? '---'}',
style: TextStyle(
fontSize: 12,
fontFamily: 'Lato',
fontWeight: FontWeight.w400,
color: Theme.of(context)
.extension<BalancePageTheme>()!
.labelTextColor,
color: Theme.of(context).extension<BalancePageTheme>()!.labelTextColor,
height: 1,
),
),
SizedBox(height: 8),
Text(
nftAsset.normalizedMetadata?.name ?? nftAsset.name ?? "",
nftAsset.normalizedMetadata?.name ?? nftAsset.name ?? "---",
style: TextStyle(
fontSize: 20,
fontFamily: 'Lato',
fontWeight: FontWeight.w900,
color: Theme.of(context)
.extension<BalancePageTheme>()!
.assetTitleColor,
color: Theme.of(context).extension<BalancePageTheme>()!.assetTitleColor,
height: 1,
),
),
@@ -92,4 +77,3 @@ class NFTTileWidget extends StatelessWidget {
);
}
}