Skip to content

Commit

Permalink
fix: update get_last_balance RPC method to get_balance
Browse files Browse the repository at this point in the history
  • Loading branch information
Ez3kiel-dev committed Jan 11, 2024
1 parent a96c1fc commit 0d80dac
Show file tree
Hide file tree
Showing 28 changed files with 386 additions and 468 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.13.3

- update get_last_balance RPC method to get_balance.

## 0.13.2

- update all events name to snake case.
Expand Down
6 changes: 3 additions & 3 deletions lib/src/data_transfer_objects/dtos.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ export 'get_accounts/get_accounts_params.dart';
export 'get_accounts/get_accounts_result.dart';
export 'get_asset/get_asset_params.dart';
export 'get_assets/get_assets_params.dart';
export 'get_balance/balance.dart';
export 'get_balance/get_balance_params.dart';
export 'get_balance/get_balance_result.dart';
export 'get_balance_at_topoheight/get_balance_at_topoheight_params.dart';
export 'get_block_at_topoheight/get_block_at_topoheight_params.dart';
export 'get_block_by_hash/get_block_by_hash_params.dart';
Expand All @@ -23,8 +24,6 @@ export 'get_blocks_at_height/get_blocks_at_height_params.dart';
export 'get_dev_fee_thresholds/get_dev_fee_threshold_result.dart';
export 'get_info/get_info_result.dart';
export 'get_info/network.dart';
export 'get_last_balance/get_last_balance_params.dart';
export 'get_last_balance/get_last_balance_result.dart';
export 'get_nonce/get_nonce_params.dart';
export 'get_peers/peer.dart';
export 'get_peers/peer_type.dart';
Expand All @@ -49,6 +48,7 @@ export 'transaction/transaction.dart';
export 'transaction/transaction_type.dart';
export 'transaction/transfer.dart';
export 'transaction_executed_event/transaction_executed_event.dart';
export 'versioned_balance/versioned_balance.dart';
export 'wallet/balance_changed_event/balance_changed.dart';
export 'wallet/build_transaction/build_transaction_params.dart';
export 'wallet/build_transaction/fee_builder.dart';
Expand Down
18 changes: 0 additions & 18 deletions lib/src/data_transfer_objects/get_balance/balance.dart

This file was deleted.

18 changes: 18 additions & 0 deletions lib/src/data_transfer_objects/get_balance/get_balance_params.dart
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);
}

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.

20 changes: 20 additions & 0 deletions lib/src/data_transfer_objects/get_balance/get_balance_result.dart
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);
}
Loading

0 comments on commit 0d80dac

Please sign in to comment.