add and use transactionVersion property for peercoin

TODO add versions for the rest of the coins
This commit is contained in:
sneurlax 2024-06-04 18:32:12 -05:00
parent 7cef4c45eb
commit b909c72cb9
3 changed files with 6 additions and 2 deletions

View file

@ -254,4 +254,7 @@ class Peercoin extends Bip39HDCurrency with ElectrumXCurrencyInterface {
);
}
}
@override
int get transactionVersion => 3;
}

View file

@ -1,5 +1,5 @@
import '../intermediate/bip39_hd_currency.dart';
mixin ElectrumXCurrencyInterface on Bip39HDCurrency {
//
int get transactionVersion;
}

View file

@ -4,6 +4,7 @@ import 'dart:typed_data';
import 'package:coinlib_flutter/coinlib_flutter.dart' as coinlib;
import 'package:isar/isar.dart';
import '../../../electrumx_rpc/cached_electrumx_client.dart';
import '../../../electrumx_rpc/client_manager.dart';
import '../../../electrumx_rpc/electrumx_client.dart';
@ -651,7 +652,7 @@ mixin ElectrumXInterface<T extends ElectrumXCurrencyInterface>
final List<coinlib.Output> prevOuts = [];
coinlib.Transaction clTx = coinlib.Transaction(
version: 1, // TODO: check if we can use 3 (as is default in coinlib)
version: cryptoCurrency.transactionVersion,
inputs: [],
outputs: [],
);