Skip to content

Commit

Permalink
fix: now two types of transfer entry
Browse files Browse the repository at this point in the history
  • Loading branch information
Ez3kiel-dev committed Apr 1, 2024
1 parent 257acd8 commit 232ff8d
Show file tree
Hide file tree
Showing 13 changed files with 413 additions and 145 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.16.2

- fix transfer entry.

## 0.16.1

- difficulty member type changed in GetInfoResult.
Expand Down
3 changes: 2 additions & 1 deletion lib/src/data_transfer_objects/dtos.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,5 @@ export 'wallet/split_address/split_address_params.dart';
export 'wallet/split_address/split_address_result.dart';
export 'wallet/transaction_entry/transaction_entry.dart';
export 'wallet/transaction_entry/transaction_entry_type.dart';
export 'wallet/transaction_entry/transfer_entry.dart';
export 'wallet/transaction_entry/transfer_in_entry.dart';
export 'wallet/transaction_entry/transfer_out_entry.dart';
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ sealed class TransactionEntryType with _$TransactionEntryType {

const factory TransactionEntryType.incoming({
@JsonKey(name: 'from') required String from,
@JsonKey(name: 'transfers') required List<TransferEntry> transfers,
@JsonKey(name: 'transfers') required List<TransferInEntry> transfers,
}) = IncomingEntry;

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

factory TransactionEntryType.fromJson(Map<String, dynamic> json) =>
Expand Down

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

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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// ignore_for_file: public_member_api_docs, invalid_annotation_target

import 'package:freezed_annotation/freezed_annotation.dart';

part 'transfer_in_entry.freezed.dart';

part 'transfer_in_entry.g.dart';

@freezed
class TransferInEntry with _$TransferInEntry {
const factory TransferInEntry({
@JsonKey(name: 'amount') required int amount,
@JsonKey(name: 'asset') required String asset,
@JsonKey(name: 'extra_data') required dynamic extraData,
}) = _TransferInEntry;

factory TransferInEntry.fromJson(Map<String, dynamic> json) =>
_$TransferInEntryFromJson(json);
}
Loading

0 comments on commit 232ff8d

Please sign in to comment.