Skip to content

Commit

Permalink
implement polygon support
Browse files Browse the repository at this point in the history
  • Loading branch information
ciripel committed Jan 15, 2024
1 parent 88f7744 commit c07c3f4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/src/networks_groups.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ class Cluster {
TWCoinType.TWCoinTypeCosmos,
TWCoinType.TWCoinTypeOsmosis,
];

static const List<int> ethereumLegacy = [
TWCoinType.TWCoinTypeEthereumClassic,
TWCoinType.TWCoinTypeSmartChain,
];

static const List<int> ethereumEIP1559 = [
TWCoinType.TWCoinTypeAvalancheCChain,
TWCoinType.TWCoinTypeEthereum,
Expand All @@ -23,6 +25,7 @@ class Cluster {
static const List<int> solana = [
TWCoinType.TWCoinTypeSolana,
];

static const List<int> utxo = [
TWCoinType.TWCoinTypeBitcoin,
TWCoinType.TWCoinTypeBitcoinCash,
Expand All @@ -49,6 +52,7 @@ class SioAssetId {
static const bitcoin = 1;
static const bnbSmartChain = 7;
static const solana = 3;
static const polygon = 16;
}

class EthNetworks {
Expand Down Expand Up @@ -116,6 +120,8 @@ class Networks {
return SioAssetId.bnbSmartChain;
case TWCoinType.TWCoinTypeSolana:
return SioAssetId.solana;
case TWCoinType.TWCoinTypePolygon:
return SioAssetId.polygon;

default:
throw Exception('Network ID is not supported');
Expand Down

0 comments on commit c07c3f4

Please sign in to comment.