Polygon-Wallet-fixes (#1222)

* fix: Fix issues surrounding polygon release

* Add polygon generation command to pubspec script

* Remove unnecesary cast

* fix: Remove unneeded code

* fix: Adjust workflow file to pick polygonScan apikey

* fix: Issues noticed while testing

* fix: Issues noticed while testing

* fix: Transaction should reflect the token name

* fix: Remove unused import

* feat: Add alchemy node to default migration settings

* Fix sending Polygon delay
Remove alchemy node
Minor Enhancements

* Remove scrolling from multiple choices settings row and make them fill the whole space [skip ci]

* Add USDT poly
Add icon for USDC.e

* Fix ERC20 tokens overriding old wallets
Add USDC.e to exchange

* - Remove unnecessary code
- Minor Enhancements

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
Adegoke David
2023-12-13 16:03:07 +02:00
committed by GitHub
co-authored by Omar Hatem
parent 7ce387c130
commit ef7762eaca
57 changed files with 320 additions and 271 deletions
@@ -8,6 +8,7 @@ import 'package:cake_wallet/src/screens/base_page.dart';
import 'package:cake_wallet/src/screens/settings/widgets/settings_picker_cell.dart';
import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell.dart';
import 'package:cake_wallet/themes/extensions/address_theme.dart';
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
import 'package:cake_wallet/themes/extensions/menu_theme.dart';
import 'package:cake_wallet/themes/extensions/picker_theme.dart';
import 'package:cake_wallet/view_model/dashboard/home_settings_view_model.dart';
@@ -91,7 +92,7 @@ class HomeSettingsPage extends BasePage {
fillColor: Theme.of(context).cardColor,
child: Icon(
Icons.add,
color: Theme.of(context).dialogTheme.backgroundColor,
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
size: 22.0,
),
padding: EdgeInsets.all(12),
+2 -2
View File
@@ -176,7 +176,7 @@ class RootState extends State<Root> with WidgetsBindingObserver {
);
launchUri = null;
} else {
_nonETHWalletErrorToast(S.current.switchToETHWallet);
_nonETHWalletErrorToast(S.current.switchToEVMCompatibleWallet);
}
}
@@ -206,7 +206,7 @@ class RootState extends State<Root> with WidgetsBindingObserver {
String? _getRouteToGo() {
if (isWalletConnectLink) {
if (isEVMCompatibleChain(widget.appStore.wallet!.type)) {
_nonETHWalletErrorToast(S.current.switchToETHWallet);
_nonETHWalletErrorToast(S.current.switchToEVMCompatibleWallet);
return null;
}
return Routes.walletConnectConnectionsListing;
@@ -1,4 +1,3 @@
import 'package:cake_wallet/core/wallet_connect/web3wallet_service.dart';
import 'package:cake_wallet/reactions/wallet_connect.dart';
import 'package:cake_wallet/src/screens/settings/widgets/settings_cell_with_arrow.dart';
import 'package:cake_wallet/src/screens/settings/widgets/settings_picker_cell.dart';
@@ -18,12 +17,11 @@ import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
class ConnectionSyncPage extends BasePage {
ConnectionSyncPage(this.dashboardViewModel, this.web3walletService);
ConnectionSyncPage(this.dashboardViewModel);
@override
String get title => S.current.connection_sync;
final Web3WalletService? web3walletService;
final DashboardViewModel dashboardViewModel;
@override
@@ -31,42 +31,43 @@ class SettingsChoicesCell extends StatelessWidget {
),
const SizedBox(height: 24),
Center(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30),
color: Theme.of(context).extension<AddressTheme>()!.actionButtonColor,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: choicesListItem.items.map((dynamic e) {
final isSelected = choicesListItem.selectedItem == e;
return GestureDetector(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30),
color: Theme.of(context).extension<AddressTheme>()!.actionButtonColor,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: choicesListItem.items.map((dynamic e) {
final isSelected = choicesListItem.selectedItem == e;
return Expanded(
child: GestureDetector(
onTap: () {
choicesListItem.onItemSelected.call(e);
},
child: Container(
padding: EdgeInsets.symmetric(horizontal: 32, vertical: 8),
padding: EdgeInsets.symmetric(vertical: 8),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30),
color: isSelected
? Theme.of(context).primaryColor
: null,
),
child: Text(
choicesListItem.displayItem.call(e),
style: TextStyle(
color: isSelected
? Colors.white
: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor,
fontWeight: isSelected ? FontWeight.w700 : FontWeight.normal,
child: Center(
child: Text(
choicesListItem.displayItem.call(e),
style: TextStyle(
color: isSelected
? Colors.white
: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor,
fontWeight: isSelected ? FontWeight.w700 : FontWeight.normal,
),
),
),
),
);
}).toList(),
),
),
);
}).toList(),
),
),
),