Skip to content

Commit 13c578d

Browse files
remove warnings and prepare release
1 parent 4414b7d commit 13c578d

28 files changed

+220
-202
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [0.8.2] - 28.Jun.2020.
2+
- Add query tests for accounts, efffects, ledgers.
3+
- Fix ledger response parsing.
4+
- Extend EffectsRequestBuilder for order, limit, cursor.
5+
- remove many warnings/hints
6+
17
## [0.8.1] - 27.Jun.2020.
28
- Add examples, app and more documentation.
39
- Restructuring of the project.

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
# [Stellar SDK for Flutter](https://github.com/Soneso/stellar_flutter_sdk)
22

3-
![Beta Version](https://img.shields.io/badge/Beta-v0.8.1-yellow.svg)
3+
![Beta Version](https://img.shields.io/badge/Beta-v0.8.2-yellow.svg)
44
![Dart](https://img.shields.io/badge/Dart-green.svg)
55
![Flutter](https://img.shields.io/badge/Flutter-blue.svg)
66
![Supports Stellar Horizon v1.4.0](https://img.shields.io/badge/Horizon-v1.4.0-blue.svg)
77
![Supports Stellar Core v13](https://img.shields.io/badge/Core-v13-blue.svg)
88

99
The Soneso open source Stellar SDK for Flutter is build with Dart and provides APIs to build and sign transactions, connect and query [Horizon](https://github.com/stellar/horizon).
1010

11-
The SDK is currently in beta stage - v. 0.8.1.
11+
The SDK is currently in beta stage - v. 0.8.2.
1212

1313
## Installation
1414

1515
### From pub.dev
1616
1. Add the dependency to your pubspec.yaml file:
1717
```
1818
dependencies:
19-
stellar_flutter_sdk: ^0.8.1
19+
stellar_flutter_sdk: ^0.8.2
2020
```
2121
2. Install it (command line or IDE):
2222
```

lib/src/manage_buy_offer_operation.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class ManageBuyOfferOperation extends Operation {
2424
/// [buying] is the asset the offer creator is buying.
2525
/// [amount] is the amount of buying being bought. Set to 0 if you want to delete an existing offer.
2626
/// [price] is the price of 1 unit of buying in terms of selling. (e.g. "0.1" => pay up to 0.1 asset selling for 1 unit asset of buying).
27-
ManageBuyOfferOperation(Asset selling, Asset buying, String amount,
28-
String price, int offerId) {
27+
ManageBuyOfferOperation(
28+
Asset selling, Asset buying, String amount, String price, int offerId) {
2929
this._selling = checkNotNull(selling, "selling cannot be null");
3030
this._buying = checkNotNull(buying, "buying cannot be null");
3131
this._amount = checkNotNull(amount, "amount cannot be null");

lib/src/manage_sell_offer_operation.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class ManageSellOfferOperation extends Operation {
1919
String _price;
2020
int _offerId;
2121

22-
ManageSellOfferOperation(Asset selling, Asset buying, String amount,
23-
String price, int offerId) {
22+
ManageSellOfferOperation(
23+
Asset selling, Asset buying, String amount, String price, int offerId) {
2424
this._selling = checkNotNull(selling, "selling cannot be null");
2525
this._buying = checkNotNull(buying, "buying cannot be null");
2626
this._amount = checkNotNull(amount, "amount cannot be null");

lib/src/operation.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ abstract class Operation {
2929

3030
String _sourceAccount;
3131

32-
static final BigInt ONE = BigInt.from(10).pow(7);
32+
static final BigInt one = BigInt.from(10).pow(7);
3333

3434
static int toXdrAmount(String value) {
3535
value = checkNotNull(value, "value cannot be null");

lib/src/requests/request_builder.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ErrorResponse implements Exception {
1818
ErrorResponse(this._code, this._body);
1919

2020
String toString() {
21-
return "Error response from the server. Code: ${_code} - Body: $body";
21+
return "Error response from the server. Code: $_code - Body: $body";
2222
}
2323

2424
int get code => _code;

lib/src/responses/submit_transaction_response.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class SubmitTransactionUnknownResponseException implements Exception {
150150
SubmitTransactionUnknownResponseException(this._code, this._body);
151151

152152
String toString() {
153-
return "Unknown response from Horizon - code: ${code} - body:$body";
153+
return "Unknown response from Horizon - code: $code - body:$body";
154154
}
155155

156156
int get code => _code;

lib/src/stellar_sdk.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import 'requests/trades_request_builder.dart';
2727

2828
/// Main class of the flutter stellar sdk.
2929
class StellarSDK {
30-
static const versionNumber = "0.8.0";
30+
static const versionNumber = "0.8.2";
3131

3232
static final StellarSDK PUBLIC =
3333
new StellarSDK("https://horizon.stellar.org");

lib/src/str_key.dart

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import 'transaction.dart';
1111
import 'xdr/xdr_data_io.dart';
1212
import 'xdr/xdr_signing.dart';
1313
import 'xdr/xdr_type.dart';
14-
import 'xdr/xdr_other.dart';
1514

1615
class VersionByte {
1716
final _value;

lib/src/transaction.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import 'account.dart';
2020
abstract class AbstractTransaction {
2121
Network _mNetwork;
2222
List<XdrDecoratedSignature> _mSignatures;
23-
static final int MIN_BASE_FEE = 100;
23+
static const int MIN_BASE_FEE = 100;
2424

2525
AbstractTransaction(Network network) {
2626
_mNetwork = checkNotNull(network, "network cannot be null");

lib/src/xdr/xdr_bucket.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,4 @@ class XdrBucketEntry {
8888
}
8989
return decodedBucketEntry;
9090
}
91-
}
91+
}

lib/src/xdr/xdr_data_entry.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,4 @@ class XdrDataValue {
8888
decodedDataValue.dataValue = stream.readBytes(dataValuesize);
8989
return decodedDataValue;
9090
}
91-
}
91+
}

lib/src/xdr/xdr_data_io.dart

-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ class DataInput {
166166
}
167167
}
168168

169-
170169
class DataOutput {
171170
List<int> data = List();
172171
int offset = 0;

lib/src/xdr/xdr_error.dart

+1-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class XdrErrorCode {
4040
}
4141
}
4242

43-
4443
class XdrError {
4544
XdrError();
4645
XdrErrorCode _code;
@@ -62,4 +61,4 @@ class XdrError {
6261
decodedError.msg = stream.readString();
6362
return decodedError;
6463
}
65-
}
64+
}

lib/src/xdr/xdr_history.dart

+6-6
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class XdrTransactionHistoryEntry {
100100

101101
static XdrTransactionHistoryEntry decode(XdrDataInputStream stream) {
102102
XdrTransactionHistoryEntry decodedTransactionHistoryEntry =
103-
XdrTransactionHistoryEntry();
103+
XdrTransactionHistoryEntry();
104104
decodedTransactionHistoryEntry.ledgerSeq = XdrUint32.decode(stream);
105105
decodedTransactionHistoryEntry.txSet = XdrTransactionSet.decode(stream);
106106
decodedTransactionHistoryEntry.ext =
@@ -126,7 +126,7 @@ class XdrTransactionHistoryEntryExt {
126126

127127
static XdrTransactionHistoryEntryExt decode(XdrDataInputStream stream) {
128128
XdrTransactionHistoryEntryExt decodedTransactionHistoryEntryExt =
129-
XdrTransactionHistoryEntryExt();
129+
XdrTransactionHistoryEntryExt();
130130
int discriminant = stream.readInt();
131131
decodedTransactionHistoryEntryExt.discriminant = discriminant;
132132
switch (decodedTransactionHistoryEntryExt.discriminant) {
@@ -162,7 +162,7 @@ class XdrTransactionHistoryResultEntry {
162162

163163
static XdrTransactionHistoryResultEntry decode(XdrDataInputStream stream) {
164164
XdrTransactionHistoryResultEntry decodedTransactionHistoryResultEntry =
165-
XdrTransactionHistoryResultEntry();
165+
XdrTransactionHistoryResultEntry();
166166
decodedTransactionHistoryResultEntry.ledgerSeq = XdrUint32.decode(stream);
167167
decodedTransactionHistoryResultEntry.txResultSet =
168168
XdrTransactionResultSet.decode(stream);
@@ -181,7 +181,7 @@ class XdrTransactionHistoryResultEntryExt {
181181
static void encode(
182182
XdrDataOutputStream stream,
183183
XdrTransactionHistoryResultEntryExt
184-
encodedTransactionHistoryResultEntryExt) {
184+
encodedTransactionHistoryResultEntryExt) {
185185
stream.writeInt(encodedTransactionHistoryResultEntryExt.discriminant);
186186
switch (encodedTransactionHistoryResultEntryExt.discriminant) {
187187
case 0:
@@ -191,8 +191,8 @@ class XdrTransactionHistoryResultEntryExt {
191191

192192
static XdrTransactionHistoryResultEntryExt decode(XdrDataInputStream stream) {
193193
XdrTransactionHistoryResultEntryExt
194-
decodedTransactionHistoryResultEntryExt =
195-
XdrTransactionHistoryResultEntryExt();
194+
decodedTransactionHistoryResultEntryExt =
195+
XdrTransactionHistoryResultEntryExt();
196196
int discriminant = stream.readInt();
197197
decodedTransactionHistoryResultEntryExt.discriminant = discriminant;
198198
switch (decodedTransactionHistoryResultEntryExt.discriminant) {

lib/src/xdr/xdr_ledger.dart

+10-12
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import 'xdr_asset.dart';
1212
import 'xdr_scp.dart';
1313
import 'xdr_account.dart';
1414

15-
1615
class XdrLedgerEntryChangeType {
1716
final _value;
1817
const XdrLedgerEntryChangeType._internal(this._value);
@@ -21,11 +20,11 @@ class XdrLedgerEntryChangeType {
2120
get value => this._value;
2221

2322
static const LEDGER_ENTRY_CREATED =
24-
const XdrLedgerEntryChangeType._internal(0);
23+
const XdrLedgerEntryChangeType._internal(0);
2524
static const LEDGER_ENTRY_UPDATED =
26-
const XdrLedgerEntryChangeType._internal(1);
25+
const XdrLedgerEntryChangeType._internal(1);
2726
static const LEDGER_ENTRY_REMOVED =
28-
const XdrLedgerEntryChangeType._internal(2);
27+
const XdrLedgerEntryChangeType._internal(2);
2928
static const LEDGER_ENTRY_STATE = const XdrLedgerEntryChangeType._internal(3);
3029

3130
static XdrLedgerEntryChangeType decode(XdrDataInputStream stream) {
@@ -92,11 +91,11 @@ class XdrLedgerUpgradeType {
9291

9392
static const LEDGER_UPGRADE_VERSION = const XdrLedgerUpgradeType._internal(1);
9493
static const LEDGER_UPGRADE_BASE_FEE =
95-
const XdrLedgerUpgradeType._internal(2);
94+
const XdrLedgerUpgradeType._internal(2);
9695
static const LEDGER_UPGRADE_MAX_TX_SET_SIZE =
97-
const XdrLedgerUpgradeType._internal(3);
96+
const XdrLedgerUpgradeType._internal(3);
9897
static const LEDGER_UPGRADE_BASE_RESERVE =
99-
const XdrLedgerUpgradeType._internal(4);
98+
const XdrLedgerUpgradeType._internal(4);
10099

101100
static XdrLedgerUpgradeType decode(XdrDataInputStream stream) {
102101
int value = stream.readInt();
@@ -503,7 +502,6 @@ class XdrLedgerUpgrade {
503502
}
504503
}
505504

506-
507505
class XdrLedgerEntry {
508506
XdrLedgerEntry();
509507
XdrUint32 _lastModifiedLedgerSeq;
@@ -669,7 +667,7 @@ class XdrLedgerEntryChange {
669667
static XdrLedgerEntryChange decode(XdrDataInputStream stream) {
670668
XdrLedgerEntryChange decodedLedgerEntryChange = XdrLedgerEntryChange();
671669
XdrLedgerEntryChangeType discriminant =
672-
XdrLedgerEntryChangeType.decode(stream);
670+
XdrLedgerEntryChangeType.decode(stream);
673671
decodedLedgerEntryChange.discriminant = discriminant;
674672
switch (decodedLedgerEntryChange.discriminant) {
675673
case XdrLedgerEntryChangeType.LEDGER_ENTRY_CREATED:
@@ -743,7 +741,7 @@ class XdrLedgerHeaderHistoryEntry {
743741

744742
static XdrLedgerHeaderHistoryEntry decode(XdrDataInputStream stream) {
745743
XdrLedgerHeaderHistoryEntry decodedLedgerHeaderHistoryEntry =
746-
XdrLedgerHeaderHistoryEntry();
744+
XdrLedgerHeaderHistoryEntry();
747745
decodedLedgerHeaderHistoryEntry.hash = XdrHash.decode(stream);
748746
decodedLedgerHeaderHistoryEntry.header = XdrLedgerHeader.decode(stream);
749747
decodedLedgerHeaderHistoryEntry.ext =
@@ -769,7 +767,7 @@ class XdrLedgerHeaderHistoryEntryExt {
769767

770768
static XdrLedgerHeaderHistoryEntryExt decode(XdrDataInputStream stream) {
771769
XdrLedgerHeaderHistoryEntryExt decodedLedgerHeaderHistoryEntryExt =
772-
XdrLedgerHeaderHistoryEntryExt();
770+
XdrLedgerHeaderHistoryEntryExt();
773771
int discriminant = stream.readInt();
774772
decodedLedgerHeaderHistoryEntryExt.discriminant = discriminant;
775773
switch (decodedLedgerHeaderHistoryEntryExt.discriminant) {
@@ -778,4 +776,4 @@ class XdrLedgerHeaderHistoryEntryExt {
778776
}
779777
return decodedLedgerHeaderHistoryEntryExt;
780778
}
781-
}
779+
}

lib/src/xdr/xdr_memo.dart

+1-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ class XdrMemoType {
4141
}
4242
}
4343

44-
4544
class XdrMemo {
4645
XdrMemo();
4746
XdrMemoType _type;
@@ -106,4 +105,4 @@ class XdrMemo {
106105
}
107106
return decodedMemo;
108107
}
109-
}
108+
}

0 commit comments

Comments
 (0)