mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-05-03 11:22:20 +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
lib/services/cashfusion
|
@ -82,7 +82,7 @@ class CovertConnection {
|
||||||
int? slotNum;
|
int? slotNum;
|
||||||
DateTime? tPing;
|
DateTime? tPing;
|
||||||
int? connNumber;
|
int? connNumber;
|
||||||
Completer wakeup = Completer();
|
Completer<bool> wakeup = Completer();
|
||||||
double? delay;
|
double? delay;
|
||||||
|
|
||||||
Future<bool> waitWakeupOrTime(DateTime? t) async {
|
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];
|
var slot = slots[slotNum];
|
||||||
|
|
||||||
assert(slot.done, "tried to set new work when prior work not done");
|
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.
|
// Then, notify the slots that there is a message to submit.
|
||||||
for (var i = 0; i < slots.length; i++) {
|
for (var i = 0; i < slots.length; i++) {
|
||||||
var slot = slots[i];
|
var slot = slots[i];
|
||||||
var subMsg = slotMessages[i];
|
var subMsg = slotMessages[i] as pb.GeneratedMessage;
|
||||||
var covConn = slot.covConn;
|
var covConn = slot.covConn;
|
||||||
|
|
||||||
if (covConn != null) {
|
if (covConn != null) {
|
||||||
|
|
|
@ -121,16 +121,16 @@ Future<Tuple<Uint8List, Uint8List>> decrypt(
|
||||||
// DOUBLE CHECK THIS IS RIGHT IDEA MATCHING PYTHON.
|
// DOUBLE CHECK THIS IS RIGHT IDEA MATCHING PYTHON.
|
||||||
|
|
||||||
ECPoint G = params.G;
|
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;
|
var point = (G * privkey.d)! + noncePoint;
|
||||||
key = crypto.sha256.convert(Util.point_to_ser(point!, true)).bytes;
|
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 {
|
} else {
|
||||||
// Handle the situation where privkey.d or noncePoint is null
|
// 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