Skip to content

Commit

Permalink
Merge pull request #113 from peercoin/0.7.2
Browse files Browse the repository at this point in the history
0.7.2
  • Loading branch information
Willy authored Nov 25, 2021
2 parents 7f8b6ee + ab8b927 commit da52191
Show file tree
Hide file tree
Showing 16 changed files with 176 additions and 113 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### **0.7.2** (2021-11-25)
* Transaction Details: incoming and outgoing Metadata is now displayed
* Fix for sending without Metadata (OP_RETURN)

### **0.7.1** (2021-11-18)
* OP_RETURN messages can now be included in the "send" tab of the wallet
* French and Polish translation
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ You can also sign up for our open beta testing here:
</a>

## Known Limitations
- can't send to Multisig addresses
- adds 1 Satoshi extra fee due to sporadic internal rounding errors
- will not mint

Expand Down
4 changes: 2 additions & 2 deletions assets/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"select_coin": "Please select a coin",
"send": "Send",
"send_address": "Address",
"send_add_metadata": "Add Meta Data",
"send_add_metadata": "Add Metadata",
"send_amount": "Amount",
"send_amount_below_minimum": "Minimum output is $amount. \nPlease chose an amount greater or equal to it.",
"send_amount_below_minimum_unable": "Minimum output is $amount. \nYou don't have enough funds to pay for the fees.",
Expand All @@ -154,7 +154,7 @@
"send_invalid_address": "Invalid address",
"send_label": "Label (optional)",
"send_oops": "Something went wrong, please try again",
"send_op_return": "OP_RETURN Message",
"send_op_return": "Metadata Message",
"send_qr": "QR-Code",
"send_to": " to ",
"send_total": "Total $amount $letter_code",
Expand Down
30 changes: 5 additions & 25 deletions lib/models/coinwallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -119,31 +119,11 @@ class CoinWallet extends HiveObject {
void clearPendingTransactionNotifications() {
if (pendingTransactionNotifications.isNotEmpty) {
pendingTransactionNotifications.forEach((pendingNotifcation) {
var nOfTxInHive = transactions
.where(
(element) =>
element.address == pendingNotifcation.address &&
element.direction == 'in',
)
.length;
if (pendingNotifcation.tx != nOfTxInHive) {
var difference = pendingNotifcation.tx - nOfTxInHive;
while (difference > 0) {
putTransaction(
WalletTransaction(
txid: 'notification_dummy',
timestamp: -1, //flags phantom tx
value: 0,
fee: 0,
address: pendingNotifcation.address,
direction: 'in',
broadCasted: true,
confirmations: 0,
broadcastHex: '',
),
);
difference--;
}
var address = addresses.firstWhere(
(element) => element.address == pendingNotifcation.address);

if (pendingNotifcation.tx != address.notificationBackendCount) {
address.newNotificationBackendCount = pendingNotifcation.tx;
}
});
}
Expand Down
6 changes: 6 additions & 0 deletions lib/models/walletaddress.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class WalletAddress extends HiveObject {
String? wif = ''; //nullable for backward compatability
@HiveField(6)
bool? _isChangeAddr = false;
@HiveField(7, defaultValue: 0)
int notificationBackendCount = 0;

WalletAddress({
required this.address,
Expand Down Expand Up @@ -50,4 +52,8 @@ class WalletAddress extends HiveObject {
set isChangeAddr(bool newChange) {
_isChangeAddr = newChange;
}

set newNotificationBackendCount(int newCount) {
notificationBackendCount = newCount;
}
}
10 changes: 7 additions & 3 deletions lib/models/walletaddress.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions lib/models/wallettransaction.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class WalletTransaction extends HiveObject {
bool broadCasted = true;
@HiveField(8)
String broadcastHex = '';
@HiveField(9, defaultValue: '')
String opReturn = '';

WalletTransaction({
required this.txid,
Expand All @@ -32,6 +34,7 @@ class WalletTransaction extends HiveObject {
required this.broadCasted,
required this.broadcastHex,
required this.confirmations,
required this.opReturn,
});

set newTimestamp(int newTime) {
Expand All @@ -46,6 +49,10 @@ class WalletTransaction extends HiveObject {
broadCasted = newBroadcasted;
}

set newOpReturn(String newOpReturn) {
opReturn = newOpReturn;
}

void resetBroadcastHex() {
broadcastHex = '';
}
Expand Down
7 changes: 5 additions & 2 deletions lib/models/wallettransaction.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit da52191

Please sign in to comment.