Skip to content

Commit

Permalink
fix: outgoing transaction entry
Browse files Browse the repository at this point in the history
  • Loading branch information
Ez3kiel-dev committed Apr 14, 2024
1 parent 1c26d3c commit 7f468de
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 78 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 0.17.0

Daemon API upgrade :

- GetMempoolCache RPC method.

Wallet API:

- Fix outgoing transaction entry.

## 0.16.2

- fix transfer entry.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ class TransactionEntry with _$TransactionEntry {
required String hash,
required int topoHeight,
required TransactionEntryType txEntryType,
int? fee,
int? nonce,
}) = _TransactionEntry;

/// @nodoc
Expand All @@ -29,8 +27,6 @@ class TransactionEntry with _$TransactionEntry {
hash: hash,
topoHeight: topoHeight,
txEntryType: CoinbaseEntry.fromJson(coinbase),
fee: json['fee'] as int?,
nonce: json['nonce'] as int?,
);
} else if (json
case {
Expand All @@ -42,8 +38,6 @@ class TransactionEntry with _$TransactionEntry {
hash: hash,
topoHeight: topoHeight,
txEntryType: BurnEntry.fromJson(burn),
fee: json['fee'] as int?,
nonce: json['nonce'] as int?,
);
} else if (json
case {
Expand All @@ -55,8 +49,6 @@ class TransactionEntry with _$TransactionEntry {
hash: hash,
topoHeight: topoHeight,
txEntryType: IncomingEntry.fromJson(incoming),
fee: json['fee'] as int?,
nonce: json['nonce'] as int?,
);
} else if (json
case {
Expand All @@ -68,8 +60,6 @@ class TransactionEntry with _$TransactionEntry {
hash: hash,
topoHeight: topoHeight,
txEntryType: OutgoingEntry.fromJson(outgoing),
fee: json['fee'] as int?,
nonce: json['nonce'] as int?,
);
} else {
throw Exception('Unknown type for this transaction entry: $json');
Expand Down

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

Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ sealed class TransactionEntryType with _$TransactionEntryType {

/// @nodoc
const factory TransactionEntryType.outgoing({
@JsonKey(name: 'fee') required int fee,
@JsonKey(name: 'nonce') required int nonce,
@JsonKey(name: 'transfers') required List<TransferOutEntry> transfers,
}) = OutgoingEntry;

Expand Down
Loading

0 comments on commit 7f468de

Please sign in to comment.