-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update get_last_balance RPC method to get_balance
- Loading branch information
1 parent
a96c1fc
commit 0d80dac
Showing
28 changed files
with
386 additions
and
468 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
lib/src/data_transfer_objects/get_balance/get_balance_params.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// ignore_for_file: public_member_api_docs, invalid_annotation_target | ||
|
||
import 'package:freezed_annotation/freezed_annotation.dart'; | ||
|
||
part 'get_balance_params.freezed.dart'; | ||
|
||
part 'get_balance_params.g.dart'; | ||
|
||
@freezed | ||
class GetBalanceParams with _$GetBalanceParams { | ||
const factory GetBalanceParams({ | ||
@JsonKey(name: 'address') required String address, | ||
@JsonKey(name: 'asset') required String asset, | ||
}) = _GetBalanceParams; | ||
|
||
factory GetBalanceParams.fromJson(Map<String, dynamic> json) => | ||
_$GetBalanceParamsFromJson(json); | ||
} |
89 changes: 47 additions & 42 deletions
89
...ance/get_last_balance_params.freezed.dart → ...t_balance/get_balance_params.freezed.dart
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
10 changes: 5 additions & 5 deletions
10
...st_balance/get_last_balance_params.g.dart → ...cts/get_balance/get_balance_params.g.dart
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
lib/src/data_transfer_objects/get_balance/get_balance_result.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// ignore_for_file: public_member_api_docs, invalid_annotation_target | ||
|
||
import 'package:freezed_annotation/freezed_annotation.dart'; | ||
|
||
import 'package:xelis_dart_sdk/xelis_dart_sdk.dart'; | ||
|
||
part 'get_balance_result.freezed.dart'; | ||
|
||
part 'get_balance_result.g.dart'; | ||
|
||
@freezed | ||
class GetBalanceResult with _$GetBalanceResult { | ||
const factory GetBalanceResult({ | ||
@JsonKey(name: 'version') required VersionedBalance versionedBalance, | ||
@JsonKey(name: 'topoheight') required int topoHeight, | ||
}) = _GetBalanceResult; | ||
|
||
factory GetBalanceResult.fromJson(Map<String, dynamic> json) => | ||
_$GetBalanceResultFromJson(json); | ||
} |
Oops, something went wrong.