Skip to content

Commit

Permalink
add protocol 22-rc3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-rogobete committed Nov 4, 2024
1 parent 06e5b29 commit e561b15
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [1.9.1-beta] - 31.Oct.2024.
- Improved Protocol 22 support backwards compatibility:
- revert createdAt to int in soroban TransactionInfo (getTransactions)
- make pagingToken in soroban EventInfo not nullable so it can still be used.
- Improve ErrorResponse object to contain the http response

## [1.9.0-beta] - 24.Oct.2024.
- Protocol 22 support

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Prepare for Protocol 22 upgrade:

```
dependencies:
stellar_flutter_sdk: ^1.9.0-beta
stellar_flutter_sdk: ^1.9.1-beta
```

2. Install it (command line or IDE):
Expand Down
11 changes: 9 additions & 2 deletions lib/src/soroban/soroban_server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1250,6 +1250,13 @@ class TransactionInfo {
? List<String>.from(json['diagnosticEventsXdr'].map((e) => e))
: null;

int createdAt = 0;
if (json['createdAt'] is int) {
createdAt = json['createdAt'];
} else {
createdAt = convertInt(json['createdAt']) ?? 0;
}

return TransactionInfo(
json['status'],
json['applicationOrder'],
Expand All @@ -1258,7 +1265,7 @@ class TransactionInfo {
json['resultXdr'],
json['resultMetaXdr'],
json['ledger'],
json['createdAt'],
createdAt,
json['txHash'],
diagnosticEventsXdr,
);
Expand Down Expand Up @@ -1470,7 +1477,7 @@ class EventInfo {
value,
json['inSuccessfulContractCall'],
json['txHash'],
json['pagingToken'],
json['pagingToken'] ?? json['id'],
);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/src/stellar_sdk.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import 'requests/liquidity_pools_request_builder.dart';

/// Main class of the flutter stellar sdk.
class StellarSDK {
static const versionNumber = "1.9.0-beta";
static const versionNumber = "1.9.1-beta";

static final StellarSDK PUBLIC = StellarSDK("https://horizon.stellar.org");
static final StellarSDK TESTNET =
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: stellar_flutter_sdk
description: A stellar blockchain sdk that query's horizon, build, signs and submits transactions to the stellar network.
version: 1.9.0-beta
version: 1.9.1-beta
homepage: https://github.com/Soneso/stellar_flutter_sdk

environment:
Expand Down

0 comments on commit e561b15

Please sign in to comment.