mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-03-12 09:32:33 +00:00
A few fixes
This commit is contained in:
parent
9aa5ef8331
commit
b07c3d8a54
3 changed files with 7 additions and 5 deletions
|
@ -268,7 +268,7 @@ class ElectrumClient {
|
|||
final header = await call(method: 'blockchain.block.header', params: [height]) as String;
|
||||
final bd = ByteData.sublistView(Uint8List.fromList(hex.decode(header)));
|
||||
final timestamp = bd.getUint32(68, Endian.little) * 1000;
|
||||
return DateTime.fromMillisecondsSinceEpoch(timestamp, isUtc: true);
|
||||
return DateTime.fromMillisecondsSinceEpoch(timestamp);
|
||||
}
|
||||
|
||||
Future<double> estimatefee({required int p}) =>
|
||||
|
|
|
@ -196,8 +196,8 @@ class ElectrumTransactionInfo extends TransactionInfo {
|
|||
direction: parseTransactionDirectionFromInt(data['direction'] as int),
|
||||
date: DateTime.fromMillisecondsSinceEpoch(data['date'] as int),
|
||||
isPending: data['isPending'] as bool,
|
||||
inputAddresses: data['inputAddresses'] as List<String>,
|
||||
outputAddresses: data['outputAddresses'] as List<String>,
|
||||
inputAddresses: List<String>.from(data['inputAddresses'] as List),
|
||||
outputAddresses: List<String>.from(data['outputAddresses'] as List),
|
||||
confirmations: data['confirmations'] as int);
|
||||
}
|
||||
|
||||
|
|
|
@ -149,10 +149,12 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
|||
}
|
||||
final tx = ElectrumTransactionInfo(WalletType.litecoin,
|
||||
id: utxo.outputId, height: utxo.height,
|
||||
amount: utxo.value.toInt(),
|
||||
amount: utxo.value.toInt(), fee: 0,
|
||||
direction: TransactionDirection.incoming,
|
||||
isPending: utxo.height == 0,
|
||||
date: date, confirmations: confirmations);
|
||||
date: date, confirmations: confirmations,
|
||||
inputAddresses: [],
|
||||
outputAddresses: [utxo.address]);
|
||||
transactionHistory.addOne(tx);
|
||||
await transactionHistory.save();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue