-
Notifications
You must be signed in to change notification settings - Fork 76
mwc integration #1016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: mwc
Are you sure you want to change the base?
mwc integration #1016
Changes from all commits
470a8ac
9d04e47
68a6769
7537105
0accfff
356c640
652c141
8610a72
1bd8efe
adb6531
626efb7
ab525e8
e225b4c
f05631a
e60b360
1466110
041ce04
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
+1 −1 | README.md | |
+2 −32 | analysis_options.yaml | |
+14 −8 | example/README.md | |
+0 −160 | example/lib/advanced_functions_view.dart | |
+0 −27 | example/lib/epicbox_config.dart | |
+93 −40 | example/lib/init_transaction_view.dart | |
+209 −4 | example/lib/main.dart | |
+211 −120 | example/lib/mnemonic_view.dart | |
+26 −12 | example/lib/password_view.dart | |
+92 −28 | example/lib/recover_view.dart | |
+130 −67 | example/lib/transaction_view.dart | |
+0 −29 | example/lib/util.dart | |
+0 −146 | example/lib/wallet_management_view.dart | |
+148 −40 | example/lib/wallet_name.dart | |
+56 −104 | example/pubspec.lock | |
+89 −370 | lib/epic_cash.dart | |
+108 −186 | lib/lib.dart |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file should be reverted as this file is only for migrations of old data of which there is none for a newly added coin |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,6 +95,8 @@ class TransactionV2 { | |
|
||
bool get isEpiccashTransaction => | ||
_getFromOtherData(key: TxV2OdKeys.isEpiccashTransaction) == true; | ||
bool get isMimblewimblecoinTransaction => | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Insert the |
||
_getFromOtherData(key: TxV2OdKeys.isMimblewimblecoinTransaction) == true; | ||
int? get numberOfMessages => | ||
_getFromOtherData(key: TxV2OdKeys.numberOfMessages) as int?; | ||
String? get slateId => _getFromOtherData(key: TxV2OdKeys.slateId) as String?; | ||
|
@@ -287,6 +289,74 @@ class TransactionV2 { | |
} | ||
} | ||
|
||
if (isMimblewimblecoinTransaction) { | ||
if (slateId == null) { | ||
return "Restored Funds"; | ||
} | ||
|
||
if (isCancelled) { | ||
return "Cancelled"; | ||
} else if (type == TransactionType.incoming) { | ||
if (isConfirmed(currentChainHeight, minConfirms, minCoinbaseConfirms)) { | ||
return "Received"; | ||
} else { | ||
if (numberOfMessages == 1) { | ||
return "Receiving (waiting for sender)"; | ||
} else if ((numberOfMessages ?? 0) > 1) { | ||
return "Receiving (waiting for confirmations)"; // TODO test if the sender still has to open again after the receiver has 2 messages present, ie. sender->receiver->sender->node (yes) vs. sender->receiver->node (no) | ||
} else { | ||
return "Receiving ${prettyConfirms()}"; | ||
} | ||
} | ||
} else if (type == TransactionType.outgoing) { | ||
if (isConfirmed(currentChainHeight, minConfirms, minCoinbaseConfirms)) { | ||
return "Sent (confirmed)"; | ||
} else { | ||
if (numberOfMessages == 1) { | ||
return "Sending (waiting for receiver)"; | ||
} else if ((numberOfMessages ?? 0) > 1) { | ||
return "Sending (waiting for confirmations)"; | ||
} else { | ||
return "Sending ${prettyConfirms()}"; | ||
} | ||
} | ||
} | ||
} | ||
|
||
if (isMimblewimblecoinTransaction) { | ||
if (slateId == null) { | ||
return "Restored Funds"; | ||
} | ||
|
||
if (isCancelled) { | ||
return "Cancelled"; | ||
} else if (type == TransactionType.incoming) { | ||
if (isConfirmed(currentChainHeight, minConfirms, minCoinbaseConfirms)) { | ||
return "Received"; | ||
} else { | ||
if (numberOfMessages == 1) { | ||
return "Receiving (waiting for sender)"; | ||
} else if ((numberOfMessages ?? 0) > 1) { | ||
return "Receiving (waiting for confirmations)"; // TODO test if the sender still has to open again after the receiver has 2 messages present, ie. sender->receiver->sender->node (yes) vs. sender->receiver->node (no) | ||
} else { | ||
return "Receiving ${prettyConfirms()}"; | ||
} | ||
} | ||
} else if (type == TransactionType.outgoing) { | ||
if (isConfirmed(currentChainHeight, minConfirms, minCoinbaseConfirms)) { | ||
return "Sent (confirmed)"; | ||
} else { | ||
if (numberOfMessages == 1) { | ||
return "Sending (waiting for receiver)"; | ||
} else if ((numberOfMessages ?? 0) > 1) { | ||
return "Sending (waiting for confirmations)"; | ||
} else { | ||
return "Sending ${prettyConfirms()}"; | ||
} | ||
} | ||
} | ||
} | ||
|
||
if (type == TransactionType.incoming) { | ||
// if (_transaction.isMinting) { | ||
// return "Minting"; | ||
|
@@ -347,6 +417,7 @@ abstract final class TxV2OdKeys { | |
static const size = "size"; | ||
static const vSize = "vSize"; | ||
static const isEpiccashTransaction = "isEpiccashTransaction"; | ||
static const isMimblewimblecoinTransaction = "isMimblewimblecoinTransaction"; | ||
static const numberOfMessages = "numberOfMessages"; | ||
static const slateId = "slateId"; | ||
static const onChainNote = "onChainNote"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should be reverted as this file is only for migrations of old data of which there is none for a newly added coin