CW-527-Add-Polygon-MATIC-Wallet (#1179)

* chore: Initial setup for polygon package

* feat: Add polygon node urls

* feat: Add Polygon(MATIC) wallet WIP

* feat: Add Polygon(MATIC) wallet WIP

* feat: Add Polygon MATIC wallet [skip ci]

* fix: Issue with create/restore wallet for polygon

* feat: Add erc20 tokens for polygon

* feat: Adding Polygon MATIC Wallet

* fix: Add build command for polygon to workflow file to fix failing action

* fix: Switch evm to not display additional balance

* chore: Sync with remote

* fix: Revert change to inject app script

* feat: Add polygon erc20 tokens

* feat: Increase migration version

* fix: Restore from QR address validator fix

* fix: Adjust wallet connect connection flow to adapt to wallet type

* fix: Make wallet fetch nfts based on the current wallet type

* fix: Make wallet fetch nfts based on the current wallet type

* fix: Try fetching transactions with moralis

* fix: Requested review changes

* fix: Error creating new wallet

* fix: Revert script

* fix: Exclude spam NFTs from nft listing API response

* Update default_erc20_tokens.dart

* replace matic with matic poly

* Add polygon wallet scheme to app links

* style: reformat default_settings_migration.dart 

* minor enhancement 

* fix using different wallet function for setting the transaction priorities 

* fix: Add chain to calls

* Add USDC.e to initial coins

* Add other default polygon node 

* Use Polygon scan
some UI fixes

* Add polygon scan api key to secrets generation code

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
Adegoke David 2023-12-02 03:26:43 +01:00 committed by GitHub
parent 3b7f9a297c
commit b3d579c24a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
116 changed files with 2351 additions and 206 deletions

View file

@ -88,6 +88,8 @@ class Node extends HiveObject with Keyable {
} else {
return Uri.http(uriRaw, '');
}
case WalletType.polygon:
return Uri.https(uriRaw, '');
default:
throw Exception('Unexpected type ${type.toString()} for Node uri');
}
@ -146,6 +148,8 @@ class Node extends HiveObject with Keyable {
case WalletType.nano:
case WalletType.banano:
return requestNanoNode();
case WalletType.polygon:
return requestElectrumServer();
default:
return false;
}