clean up some TODOs

This commit is contained in:
julian 2024-06-07 08:45:56 -06:00
parent 337b1c0171
commit e76ee79c89
13 changed files with 51 additions and 66 deletions

View file

@ -195,9 +195,6 @@ class AppNameText extends StatelessWidget {
Widget build(BuildContext context) {
return Text(
AppConfig.appName,
// TODO [prio=high]: appName is now static due to `'appName' can't be
// accessed using static access.`", check that that doesn't cause issues
// elsewhere.
textAlign: TextAlign.center,
style: !isDesktop
? STextStyles.pageTitleH1(context)

View file

@ -191,17 +191,6 @@ class _WalletViewState extends ConsumerState<WalletView> {
_rescanningOnOpen = true;
_lelantusRescanRecovery = true;
_firoRescanRecovery();
// } else if (ref.read(managerProvider).rescanOnOpenVersion ==
// TODO: [prio=med]
// Constants.rescanV1) {
// _rescanningOnOpen = true;
// ref.read(managerProvider).fullRescan(20, 1000).then(
// (_) => ref.read(managerProvider).resetRescanOnOpen().then(
// (_) => WidgetsBinding.instance.addPostFrameCallback(
// (_) => setState(() => _rescanningOnOpen = false),
// ),
// ),
// );
} else {
wallet.refresh();
}

View file

@ -94,9 +94,9 @@ class Bitcoin extends Bip39HDCurrency
pubHDPrefix: 0x0488b21e,
bech32Hrp: "bc",
messagePrefix: '\x18Bitcoin Signed Message:\n',
minFee: BigInt.from(1), // TODO [prio=high].
minOutput: dustLimit.raw, // TODO.
feePerKb: BigInt.from(1), // TODO.
minFee: BigInt.from(1), // Not used in stack wallet currently
minOutput: dustLimit.raw, // Not used in stack wallet currently
feePerKb: BigInt.from(1), // Not used in stack wallet currently
);
case CryptoCurrencyNetwork.test:
return coinlib.Network(
@ -107,9 +107,9 @@ class Bitcoin extends Bip39HDCurrency
pubHDPrefix: 0x043587cf,
bech32Hrp: "tb",
messagePrefix: "\x18Bitcoin Signed Message:\n",
minFee: BigInt.from(1), // TODO [prio=high].
minOutput: dustLimit.raw, // TODO.
feePerKb: BigInt.from(1), // TODO.
minFee: BigInt.from(1), // Not used in stack wallet currently
minOutput: dustLimit.raw, // Not used in stack wallet currently
feePerKb: BigInt.from(1), // Not used in stack wallet currently
);
default:
throw Exception("Unsupported network: $network");

View file

@ -1,6 +1,7 @@
import 'dart:typed_data';
import 'package:coinlib_flutter/coinlib_flutter.dart' as coinlib;
import '../../../models/isar/models/blockchain_data/address.dart';
import '../../../models/node_model.dart';
import '../../../utilities/amount/amount.dart';
@ -126,9 +127,9 @@ class BitcoinFrost extends FrostCurrency {
pubHDPrefix: 0x0488b21e,
bech32Hrp: "bc",
messagePrefix: '\x18Bitcoin Signed Message:\n',
minFee: BigInt.from(1), // TODO [prio=high].
minOutput: dustLimit.raw, // TODO.
feePerKb: BigInt.from(1), // TODO.
minFee: BigInt.from(1), // Not used in stack wallet currently
minOutput: dustLimit.raw, // Not used in stack wallet currently
feePerKb: BigInt.from(1), // Not used in stack wallet currently
);
case CryptoCurrencyNetwork.test:
return coinlib.Network(
@ -139,9 +140,9 @@ class BitcoinFrost extends FrostCurrency {
pubHDPrefix: 0x043587cf,
bech32Hrp: "tb",
messagePrefix: "\x18Bitcoin Signed Message:\n",
minFee: BigInt.from(1), // TODO [prio=high].
minOutput: dustLimit.raw, // TODO.
feePerKb: BigInt.from(1), // TODO.
minFee: BigInt.from(1), // Not used in stack wallet currently
minOutput: dustLimit.raw, // Not used in stack wallet currently
feePerKb: BigInt.from(1), // Not used in stack wallet currently
);
default:
throw Exception("Unsupported network: $network");

View file

@ -101,9 +101,9 @@ class Bitcoincash extends Bip39HDCurrency with ElectrumXCurrencyInterface {
pubHDPrefix: 0x0488b21e,
bech32Hrp: "bc",
messagePrefix: '\x18Bitcoin Signed Message:\n',
minFee: BigInt.from(1), // TODO [prio=high].
minOutput: dustLimit.raw, // TODO.
feePerKb: BigInt.from(1), // TODO.
minFee: BigInt.from(1), // Not used in stack wallet currently
minOutput: dustLimit.raw, // Not used in stack wallet currently
feePerKb: BigInt.from(1), // Not used in stack wallet currently
);
case CryptoCurrencyNetwork.test:
return coinlib.Network(
@ -114,9 +114,9 @@ class Bitcoincash extends Bip39HDCurrency with ElectrumXCurrencyInterface {
pubHDPrefix: 0x043587cf,
bech32Hrp: "tb",
messagePrefix: "\x18Bitcoin Signed Message:\n",
minFee: BigInt.from(1), // TODO [prio=high].
minOutput: dustLimit.raw, // TODO.
feePerKb: BigInt.from(1), // TODO.
minFee: BigInt.from(1), // Not used in stack wallet currently
minOutput: dustLimit.raw, // Not used in stack wallet currently
feePerKb: BigInt.from(1), // Not used in stack wallet currently
);
default:
throw Exception("Unsupported network: $network");

View file

@ -143,9 +143,9 @@ class Dogecoin extends Bip39HDCurrency with ElectrumXCurrencyInterface {
pubHDPrefix: 0x02facafd,
bech32Hrp: "doge",
messagePrefix: '\x18Dogecoin Signed Message:\n',
minFee: BigInt.from(1), // TODO [prio=high].
minOutput: dustLimit.raw, // TODO.
feePerKb: BigInt.from(1), // TODO.
minFee: BigInt.from(1), // Not used in stack wallet currently
minOutput: dustLimit.raw, // Not used in stack wallet currently
feePerKb: BigInt.from(1), // Not used in stack wallet currently
);
case CryptoCurrencyNetwork.test:
return coinlib.Network(
@ -156,9 +156,9 @@ class Dogecoin extends Bip39HDCurrency with ElectrumXCurrencyInterface {
pubHDPrefix: 0x043587cf,
bech32Hrp: "tdge",
messagePrefix: "\x18Dogecoin Signed Message:\n",
minFee: BigInt.from(1), // TODO [prio=high].
minOutput: dustLimit.raw, // TODO.
feePerKb: BigInt.from(1), // TODO.
minFee: BigInt.from(1), // Not used in stack wallet currently
minOutput: dustLimit.raw, // Not used in stack wallet currently
feePerKb: BigInt.from(1), // Not used in stack wallet currently
);
default:
throw Exception("Unsupported network: $network");

View file

@ -96,9 +96,9 @@ class Ecash extends Bip39HDCurrency with ElectrumXCurrencyInterface {
pubHDPrefix: 0x0488b21e,
bech32Hrp: "bc",
messagePrefix: '\x18Bitcoin Signed Message:\n',
minFee: BigInt.from(1), // TODO [prio=high].
minOutput: dustLimit.raw, // TODO.
feePerKb: BigInt.from(1), // TODO.
minFee: BigInt.from(1), // Not used in stack wallet currently
minOutput: dustLimit.raw, // Not used in stack wallet currently
feePerKb: BigInt.from(1), // Not used in stack wallet currently
);
case CryptoCurrencyNetwork.test:
return coinlib.Network(
@ -109,9 +109,9 @@ class Ecash extends Bip39HDCurrency with ElectrumXCurrencyInterface {
pubHDPrefix: 0x043587cf,
bech32Hrp: "tb",
messagePrefix: "\x18Bitcoin Signed Message:\n",
minFee: BigInt.from(1), // TODO [prio=high].
minOutput: dustLimit.raw, // TODO.
feePerKb: BigInt.from(1), // TODO.
minFee: BigInt.from(1), // Not used in stack wallet currently
minOutput: dustLimit.raw, // Not used in stack wallet currently
feePerKb: BigInt.from(1), // Not used in stack wallet currently
);
default:
throw Exception("Unsupported network: $network");

View file

@ -89,9 +89,9 @@ class Firo extends Bip39HDCurrency with ElectrumXCurrencyInterface {
pubHDPrefix: 0x0488b21e,
bech32Hrp: "bc",
messagePrefix: '\x18Zcoin Signed Message:\n',
minFee: BigInt.from(1), // TODO [prio=high].
minOutput: dustLimit.raw, // TODO.
feePerKb: BigInt.from(1), // TODO.
minFee: BigInt.from(1), // Not used in stack wallet currently
minOutput: dustLimit.raw, // Not used in stack wallet currently
feePerKb: BigInt.from(1), // Not used in stack wallet currently
);
case CryptoCurrencyNetwork.test:
return coinlib.Network(
@ -102,9 +102,9 @@ class Firo extends Bip39HDCurrency with ElectrumXCurrencyInterface {
pubHDPrefix: 0x043587cf,
bech32Hrp: "tb",
messagePrefix: "\x18Zcoin Signed Message:\n",
minFee: BigInt.from(1), // TODO [prio=high].
minOutput: dustLimit.raw, // TODO.
feePerKb: BigInt.from(1), // TODO.
minFee: BigInt.from(1), // Not used in stack wallet currently
minOutput: dustLimit.raw, // Not used in stack wallet currently
feePerKb: BigInt.from(1), // Not used in stack wallet currently
);
default:
throw Exception("Unsupported network: $network");

View file

@ -96,9 +96,9 @@ class Litecoin extends Bip39HDCurrency with ElectrumXCurrencyInterface {
pubHDPrefix: 0x0488b21e,
bech32Hrp: "ltc",
messagePrefix: '\x19Litecoin Signed Message:\n',
minFee: BigInt.from(1), // TODO [prio=high].
minOutput: dustLimit.raw, // TODO.
feePerKb: BigInt.from(1), // TODO.
minFee: BigInt.from(1), // Not used in stack wallet currently
minOutput: dustLimit.raw, // Not used in stack wallet currently
feePerKb: BigInt.from(1), // Not used in stack wallet currently
);
case CryptoCurrencyNetwork.test:
return coinlib.Network(
@ -109,9 +109,9 @@ class Litecoin extends Bip39HDCurrency with ElectrumXCurrencyInterface {
pubHDPrefix: 0x043587cf,
bech32Hrp: "tltc",
messagePrefix: "\x19Litecoin Signed Message:\n",
minFee: BigInt.from(1), // TODO [prio=high].
minOutput: dustLimit.raw, // TODO.
feePerKb: BigInt.from(1), // TODO.
minFee: BigInt.from(1), // Not used in stack wallet currently
minOutput: dustLimit.raw, // Not used in stack wallet currently
feePerKb: BigInt.from(1), // Not used in stack wallet currently
);
default:
throw Exception("Unsupported network: $network");

View file

@ -185,9 +185,9 @@ class Namecoin extends Bip39HDCurrency with ElectrumXCurrencyInterface {
pubHDPrefix: 0x0488b21e,
bech32Hrp: "nc",
messagePrefix: '\x18Namecoin Signed Message:\n',
minFee: BigInt.from(1), // TODO [prio=high].
minOutput: dustLimit.raw, // TODO.
feePerKb: BigInt.from(1), // TODO.
minFee: BigInt.from(1), // Not used in stack wallet currently
minOutput: dustLimit.raw, // Not used in stack wallet currently
feePerKb: BigInt.from(1), // Not used in stack wallet currently
);
// case CryptoCurrencyNetwork.test:
// TODO: [prio=low] Add testnet support.

View file

@ -165,9 +165,9 @@ class Particl extends Bip39HDCurrency with ElectrumXCurrencyInterface {
pubHDPrefix: 0x696e82d1,
bech32Hrp: "pw",
messagePrefix: '\x18Bitcoin Signed Message:\n',
minFee: BigInt.from(1), // TODO [prio=high].
minOutput: dustLimit.raw, // TODO.
feePerKb: BigInt.from(1), // TODO.
minFee: BigInt.from(1), // Not used in stack wallet currently
minOutput: dustLimit.raw, // Not used in stack wallet currently
feePerKb: BigInt.from(1), // Not used in stack wallet currently
);
// case CryptoCurrencyNetwork.test:
// TODO: [prio=low] Add testnet.

View file

@ -29,9 +29,6 @@ enum CryptoCurrencyNetwork {
}
abstract class CryptoCurrency {
// @Deprecated("[prio=low] Should eventually move away from Coin enum")
// late final CryptoCurrency coin;
final CryptoCurrencyNetwork network;
CryptoCurrency(this.network);

View file

@ -567,7 +567,8 @@ class FiroWallet<T extends ElectrumXCurrencyInterface> extends Bip39HDWallet<T>
String? label;
if (jsonUTXO["value"] is int) {
// TODO: [prio=med] use special electrumx call to verify the 1000 Firo output is masternode
// TODO: [prio=high] use special electrumx call to verify the 1000 Firo output is masternode
// electrumx call should exist now. Unsure if it works though
blocked = Amount.fromDecimal(
Decimal.fromInt(
1000, // 1000 firo output is a possible master node