@@ -14,42 +14,62 @@ import '../interfaces/electrumx_currency_interface.dart';
1414import '../intermediate/bip39_hd_currency.dart' ;
1515
1616class Firo extends Bip39HDCurrency with ElectrumXCurrencyInterface {
17- Firo (super .network) {
18- _idMain = "firo" ;
19- _uriScheme = "firo" ;
17+ Firo (super .network);
18+
19+ String get identifier {
2020 switch (network) {
2121 case CryptoCurrencyNetwork .main:
22- _id = _idMain;
23- _name = "Firo" ;
24- _ticker = "FIRO" ;
22+ return "firo" ;
2523 case CryptoCurrencyNetwork .test:
26- _id = "firoTestNet" ;
27- _name = "tFiro" ;
28- _ticker = "tFIRO" ;
24+ return "firoTestNet" ;
2925 default :
3026 throw Exception ("Unsupported network: $network " );
3127 }
3228 }
3329
34- late final String _id;
35- @override
36- String get identifier => _id;
37-
38- late final String _idMain;
39- @override
40- String get mainNetId => _idMain;
30+ String get ticker {
31+ switch (network) {
32+ case CryptoCurrencyNetwork .main:
33+ return "FIRO" ;
34+ case CryptoCurrencyNetwork .test:
35+ return "tFIRO" ;
36+ default :
37+ throw Exception ("Unsupported network: $network " );
38+ }
39+ }
4140
42- late final String _name;
43- @override
44- String get prettyName => _name;
41+ String get mainNetId {
42+ switch (network) {
43+ case CryptoCurrencyNetwork .main:
44+ return "Firo" ;
45+ case CryptoCurrencyNetwork .test:
46+ return "tFiro" ;
47+ default :
48+ throw Exception ("Unsupported network: $network " );
49+ }
50+ }
4551
46- late final String _uriScheme;
47- @override
48- String get uriScheme => _uriScheme;
52+ String get prettyName {
53+ switch (network) {
54+ case CryptoCurrencyNetwork .main:
55+ return "Firo" ;
56+ case CryptoCurrencyNetwork .test:
57+ return "tFiro" ;
58+ default :
59+ throw Exception ("Unsupported network: $network " );
60+ }
61+ }
4962
50- late final String _ticker;
51- @override
52- String get ticker => _ticker;
63+ String get uriScheme {
64+ switch (network) {
65+ case CryptoCurrencyNetwork .main:
66+ return "firo" ;
67+ case CryptoCurrencyNetwork .test:
68+ return "tfiro" ;
69+ default :
70+ throw Exception ("Unsupported network: $network " );
71+ }
72+ }
5373
5474 @override
5575 int get minConfirms => 1 ;
@@ -197,7 +217,10 @@ class Firo extends Bip39HDCurrency with ElectrumXCurrencyInterface {
197217 }
198218
199219 bool validateSparkAddress (String address) {
200- return SparkInterface .validateSparkAddress (address: address, isTestNet: network.isTestNet);
220+ return SparkInterface .validateSparkAddress (
221+ address: address,
222+ isTestNet: network.isTestNet,
223+ );
201224 }
202225
203226 bool isExchangeAddress (String address) {
0 commit comments