mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-02-02 03:06:29 +00:00
clean up compile time errors only
This commit is contained in:
parent
143e1d821a
commit
2e9c5bde8e
2 changed files with 9 additions and 8 deletions
|
@ -82,7 +82,7 @@ class CovertConnection {
|
|||
int? slotNum;
|
||||
DateTime? tPing;
|
||||
int? connNumber;
|
||||
Completer wakeup = Completer();
|
||||
Completer<bool> wakeup = Completer();
|
||||
double? delay;
|
||||
|
||||
Future<bool> waitWakeupOrTime(DateTime? t) async {
|
||||
|
@ -258,7 +258,8 @@ class CovertSubmitter extends PrintError {
|
|||
}
|
||||
}
|
||||
|
||||
void scheduleSubmit(int slotNum, DateTime tStart, dynamic subMsg) {
|
||||
void scheduleSubmit(
|
||||
int slotNum, DateTime tStart, pb.GeneratedMessage subMsg) {
|
||||
var slot = slots[slotNum];
|
||||
|
||||
assert(slot.done, "tried to set new work when prior work not done");
|
||||
|
@ -290,7 +291,7 @@ class CovertSubmitter extends PrintError {
|
|||
// Then, notify the slots that there is a message to submit.
|
||||
for (var i = 0; i < slots.length; i++) {
|
||||
var slot = slots[i];
|
||||
var subMsg = slotMessages[i];
|
||||
var subMsg = slotMessages[i] as pb.GeneratedMessage;
|
||||
var covConn = slot.covConn;
|
||||
|
||||
if (covConn != null) {
|
||||
|
|
|
@ -121,16 +121,16 @@ Future<Tuple<Uint8List, Uint8List>> decrypt(
|
|||
// DOUBLE CHECK THIS IS RIGHT IDEA MATCHING PYTHON.
|
||||
|
||||
ECPoint G = params.G;
|
||||
var key;
|
||||
final List<int> key;
|
||||
|
||||
if (privkey.d != null && noncePoint != null) {
|
||||
if (privkey.d != null) {
|
||||
var point = (G * privkey.d)! + noncePoint;
|
||||
key = crypto.sha256.convert(Util.point_to_ser(point!, true)).bytes;
|
||||
// ...
|
||||
var decryptedData = await decryptWithSymmkey(data, Uint8List.fromList(key));
|
||||
return Tuple(decryptedData, Uint8List.fromList(key));
|
||||
} else {
|
||||
// Handle the situation where privkey.d or noncePoint is null
|
||||
throw Exception("FIXME");
|
||||
}
|
||||
|
||||
var decryptedData = await decryptWithSymmkey(data, Uint8List.fromList(key));
|
||||
return Tuple(decryptedData, Uint8List.fromList(key));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue