fix offline wallet creation for namecoin and particl

This commit is contained in:
julian 2023-02-02 15:48:06 -06:00
parent 5ccc868c9b
commit 97604a792f
2 changed files with 30 additions and 22 deletions

View file

@ -1438,6 +1438,7 @@ class NamecoinWallet extends CoinServiceAPI
Logging.instance Logging.instance
.log("IS_INTEGRATION_TEST: $integrationTestFlag", level: LogLevel.Info); .log("IS_INTEGRATION_TEST: $integrationTestFlag", level: LogLevel.Info);
if (!integrationTestFlag) { if (!integrationTestFlag) {
try {
final features = await electrumXClient.getServerFeatures(); final features = await electrumXClient.getServerFeatures();
Logging.instance.log("features: $features", level: LogLevel.Info); Logging.instance.log("features: $features", level: LogLevel.Info);
switch (coin) { switch (coin) {
@ -1450,6 +1451,9 @@ class NamecoinWallet extends CoinServiceAPI
throw Exception( throw Exception(
"Attempted to generate a NamecoinWallet using a non namecoin coin type: ${coin.name}"); "Attempted to generate a NamecoinWallet using a non namecoin coin type: ${coin.name}");
} }
} catch (e, s) {
Logging.instance.log("$e/n$s", level: LogLevel.Info);
}
} }
// this should never fail // this should never fail

View file

@ -1353,6 +1353,7 @@ class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB {
Logging.instance Logging.instance
.log("IS_INTEGRATION_TEST: $integrationTestFlag", level: LogLevel.Info); .log("IS_INTEGRATION_TEST: $integrationTestFlag", level: LogLevel.Info);
if (!integrationTestFlag) { if (!integrationTestFlag) {
try {
final features = await electrumXClient.getServerFeatures(); final features = await electrumXClient.getServerFeatures();
Logging.instance.log("features: $features", level: LogLevel.Info); Logging.instance.log("features: $features", level: LogLevel.Info);
switch (coin) { switch (coin) {
@ -1365,6 +1366,9 @@ class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB {
throw Exception( throw Exception(
"Attempted to generate a ParticlWallet using a non particl coin type: ${coin.name}"); "Attempted to generate a ParticlWallet using a non particl coin type: ${coin.name}");
} }
} catch (e, s) {
Logging.instance.log("$e/n$s", level: LogLevel.Info);
}
} }
// this should never fail // this should never fail