mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-06 18:59:24 +00:00
fix: override identifier
WIP because this causes issues with BIP48Bitcoin not being in the configured list of supported coins as per AppConfig but we don't want it to appear as a distinct coin so that could be an issue
This commit is contained in:
parent
d986f27c96
commit
e5dea74096
1 changed files with 41 additions and 2 deletions
|
@ -1,8 +1,47 @@
|
|||
import '../../../utilities/enums/derive_path_type_enum.dart';
|
||||
import 'bitcoin.dart';
|
||||
import '../crypto_currency.dart';
|
||||
|
||||
class BIP48Bitcoin extends Bitcoin {
|
||||
BIP48Bitcoin(super.network);
|
||||
BIP48Bitcoin(super.network) {
|
||||
_idMain = "bip48Bitcoin";
|
||||
_uriScheme = "bitcoin";
|
||||
switch (network) {
|
||||
case CryptoCurrencyNetwork.main:
|
||||
_id = _idMain;
|
||||
_name = "Bitcoin";
|
||||
_ticker = "BTC";
|
||||
case CryptoCurrencyNetwork.test:
|
||||
_id = "bip48BitcoinTestNet";
|
||||
_name = "tBitcoin";
|
||||
_ticker = "tBTC";
|
||||
case CryptoCurrencyNetwork.test4:
|
||||
_id = "bip48BitcoinTestNet4";
|
||||
_name = "t4Bitcoin";
|
||||
_ticker = "t4BTC";
|
||||
default:
|
||||
throw Exception("Unsupported network: $network");
|
||||
}
|
||||
}
|
||||
|
||||
late final String _id;
|
||||
@override
|
||||
String get identifier => _id;
|
||||
|
||||
late final String _idMain;
|
||||
@override
|
||||
String get mainNetId => _idMain;
|
||||
|
||||
late final String _name;
|
||||
@override
|
||||
String get prettyName => _name;
|
||||
|
||||
late final String _uriScheme;
|
||||
@override
|
||||
String get uriScheme => _uriScheme;
|
||||
|
||||
late final String _ticker;
|
||||
@override
|
||||
String get ticker => _ticker;
|
||||
|
||||
@override
|
||||
List<DerivePathType> get supportedDerivationPathTypes => [
|
||||
|
|
Loading…
Reference in a new issue