do not use hardcoded firo.stackwallet.com

in order to support custom nodes.
This commit is contained in:
sneurlax 2024-02-13 19:34:18 -06:00
parent af3e194767
commit c21af7196f

View file

@ -816,7 +816,7 @@ class ElectrumXClient {
// Use electrum_adapter package's getSparkAnonymitySet method. // Use electrum_adapter package's getSparkAnonymitySet method.
Logging.instance.log("attempting to fetch lelantus.getanonymityset...", Logging.instance.log("attempting to fetch lelantus.getanonymityset...",
level: LogLevel.Info); level: LogLevel.Info);
var channel = await electrum_adapter.connect('firo.stackwallet.com'); var channel = await electrum_adapter.connect(host, port: port);
var client = electrum_adapter.FiroElectrumClient(channel); var client = electrum_adapter.FiroElectrumClient(channel);
Map<String, dynamic> anonymitySet = await client.getLelantusAnonymitySet( Map<String, dynamic> anonymitySet = await client.getLelantusAnonymitySet(
groupId: groupId, blockHash: blockhash); groupId: groupId, blockHash: blockhash);
@ -857,7 +857,7 @@ class ElectrumXClient {
// Use electrum_adapter package's getLelantusMintData method. // Use electrum_adapter package's getLelantusMintData method.
Logging.instance.log("attempting to fetch lelantus.getmintmetadata...", Logging.instance.log("attempting to fetch lelantus.getmintmetadata...",
level: LogLevel.Info); level: LogLevel.Info);
var channel = await electrum_adapter.connect('firo.stackwallet.com'); var channel = await electrum_adapter.connect(host, port: port);
var client = electrum_adapter.FiroElectrumClient(channel); var client = electrum_adapter.FiroElectrumClient(channel);
dynamic mintData = await client.getLelantusMintData(mints: mints); dynamic mintData = await client.getLelantusMintData(mints: mints);
Logging.instance.log("Fetching lelantus.getmintmetadata finished", Logging.instance.log("Fetching lelantus.getmintmetadata finished",
@ -1103,7 +1103,7 @@ class ElectrumXClient {
// Use electrum_adapter package's getSparkLatestCoinId method. // Use electrum_adapter package's getSparkLatestCoinId method.
Logging.instance.log("attempting to fetch spark.getsparklatestcoinid...", Logging.instance.log("attempting to fetch spark.getsparklatestcoinid...",
level: LogLevel.Info); level: LogLevel.Info);
var channel = await electrum_adapter.connect('firo.stackwallet.com'); var channel = await electrum_adapter.connect(host, port: port);
var client = electrum_adapter.FiroElectrumClient(channel); var client = electrum_adapter.FiroElectrumClient(channel);
int latestCoinId = await client.getSparkLatestCoinId(); int latestCoinId = await client.getSparkLatestCoinId();
Logging.instance.log("Fetching spark.getsparklatestcoinid finished", Logging.instance.log("Fetching spark.getsparklatestcoinid finished",