Skip to content

Commit

Permalink
update dependency packages
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-rogobete committed Oct 1, 2022
1 parent 4651950 commit 26ea8f2
Show file tree
Hide file tree
Showing 16 changed files with 52 additions and 39 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [1.3.7] - 01.Oct.2022.
- update dependency packages to newest versions
- update sdk to work with the newest packages
- fix example app build

## [1.3.6] - 30.Sep.2022.
- update sep-005 - add support for malay language
- update sep-001 - add new fields
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The Soneso open source Stellar SDK for Flutter is build with Dart and provides A
1. Add the dependency to your pubspec.yaml file:
```
dependencies:
stellar_flutter_sdk: ^1.3.6
stellar_flutter_sdk: ^1.3.7
```
2. Install it (command line or IDE):
```
Expand Down
6 changes: 3 additions & 3 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if (localPropertiesFile.exists()) {

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
throw new FileNotFoundException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
Expand All @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 28
compileSdkVersion 31

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -40,7 +40,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.example"
minSdkVersion 16
targetSdkVersion 28
targetSdkVersion 31
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
3 changes: 2 additions & 1 deletion example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:name="${applicationName}"
android:label="example"
android:icon="@mipmap/ic_launcher">
<activity
Expand All @@ -15,6 +15,7 @@
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:exported="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
Expand Down
8 changes: 4 additions & 4 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.7.0'
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.android.tools.build:gradle:4.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Expand Down
2 changes: 1 addition & 1 deletion example/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
android.enableJetifier=true
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-all.zip
2 changes: 1 addition & 1 deletion example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
<string>11.0</string>
</dict>
</plist>
10 changes: 5 additions & 5 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 50;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -135,7 +135,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -280,7 +280,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -362,7 +362,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -411,7 +411,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down

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

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 2 additions & 0 deletions example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,7 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
</dict>
</plist>
19 changes: 12 additions & 7 deletions lib/src/sep/0011/txrep.dart
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ class TxRep {
return transaction.toEnvelopeXdrBase64();
}

static TransactionPreconditions _getPreconditions(Map<String, String> map, String prefix) {
static TransactionPreconditions _getPreconditions(
Map<String, String> map, String prefix) {
// Preconditions
TransactionPreconditions cond = TransactionPreconditions();
String? preonditionsType = _removeComment(map['${prefix}cond.type']);
Expand Down Expand Up @@ -304,7 +305,7 @@ class TxRep {
if (_removeComment(map['${precondPrefix}minSeqNum._present']) == 'true' &&
map['${precondPrefix}minSeqNum'] != null) {
int? minSeqNum =
int.tryParse(_removeComment(map['${precondPrefix}minSeqNum'])!);
int.tryParse(_removeComment(map['${precondPrefix}minSeqNum'])!);
if (minSeqNum == null) {
throw Exception('invalid ${precondPrefix}minSeqNum');
}
Expand Down Expand Up @@ -336,7 +337,7 @@ class TxRep {

List<XdrSignerKey>? extraSigners;
String? extraSignersLen =
_removeComment(map['${precondPrefix}extraSigners.len']);
_removeComment(map['${precondPrefix}extraSigners.len']);
if (extraSignersLen == null) {
throw Exception('missing ${precondPrefix}extraSigners.len');
}
Expand Down Expand Up @@ -1630,7 +1631,8 @@ class TxRep {
'price denominator can not be 0 in ' + opPrefix + 'price.d');
}

Decimal dec = Decimal.parse(n.toString()) / Decimal.parse(d.toString());
Decimal dec =
(Decimal.parse(n.toString()) / Decimal.parse(d.toString())).toDecimal();

String? offerIdStr = _removeComment(map[opPrefix + 'offerID']);
if (offerIdStr == null) {
Expand Down Expand Up @@ -1731,7 +1733,8 @@ class TxRep {
'price denominator can not be 0 in ' + opPrefix + 'price.d');
}

Decimal dec = Decimal.parse(n.toString()) / Decimal.parse(d.toString());
Decimal dec =
(Decimal.parse(n.toString()) / Decimal.parse(d.toString())).toDecimal();

String? offerIdStr = _removeComment(map[opPrefix + 'offerID']);
if (offerIdStr == null) {
Expand Down Expand Up @@ -1831,7 +1834,8 @@ class TxRep {
throw Exception(
'price denominator can not be 0 in ' + opPrefix + 'price.d');
}
Decimal dec = Decimal.parse(n.toString()) / Decimal.parse(d.toString());
Decimal dec =
(Decimal.parse(n.toString()) / Decimal.parse(d.toString())).toDecimal();

CreatePassiveSellOfferOperationBuilder builder =
CreatePassiveSellOfferOperationBuilder(
Expand Down Expand Up @@ -2834,7 +2838,8 @@ class TxRep {
}

static String? _fromAmount(String value) {
Decimal amount = Decimal.parse(value) / Decimal.parse('10000000.00');
Decimal amount =
(Decimal.parse(value) / Decimal.parse('10000000.00')).toDecimal();
return amount.toString();
}

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 @@ -29,7 +29,7 @@ import 'requests/liquidity_pools_request_builder.dart';

/// Main class of the flutter stellar sdk.
class StellarSDK {
static const versionNumber = "1.3.6";
static const versionNumber = "1.3.7";

static final StellarSDK PUBLIC = StellarSDK("https://horizon.stellar.org");
static final StellarSDK TESTNET =
Expand Down
20 changes: 10 additions & 10 deletions 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.3.6
version: 1.3.7
homepage: https://github.com/Soneso/stellar_flutter_sdk

environment:
Expand All @@ -10,17 +10,17 @@ dependencies:
flutter:
sdk: flutter

crypto: ^3.0.1
fixnum: ^1.0.0
http: ^0.13.3
crypto: ^3.0.2
fixnum: ^1.0.1
http: ^0.13.5
collection: ^1.15.0
toml: ^0.11.0
pointycastle: ^3.3.1
toml: ^0.13.1
pointycastle: ^3.6.2
unorm_dart: ^0.2.0
decimal: ^1.3.0
pinenacl: ^0.3.3
convert: ^3.0.1
http_parser: ^4.0.0
decimal: ^2.3.0
pinenacl: ^0.5.1
convert: ^3.0.2
http_parser: ^4.0.1

dev_dependencies:
flutter_test:
Expand Down
4 changes: 2 additions & 2 deletions test/query_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ void main() {
/// ! get Claimable Balance ID from BID result at claimable_balance_test.dart
Page<OperationResponse> operationsPage = await sdk.operations
.forClaimableBalance(
"00000000b20be55ee09520b0477a39b5ace644899b0cd7128d61b5de0620cafc8f523cca")
"000000009e4ce7ec853a31c6a096ff7bf0d49a39a60bd112f5f73bf44fa92d8e9fbed6f8")
.limit(1)
.order(RequestBuilderOrder.DESC)
.execute();
Expand All @@ -189,7 +189,7 @@ void main() {
/// ! get Claimable Balance ID from BID result at claimable_balance_test.dart
Page<TransactionResponse> transactionsPage = await sdk.transactions
.forClaimableBalance(
"00000000b20be55ee09520b0477a39b5ace644899b0cd7128d61b5de0620cafc8f523cca")
"000000009e4ce7ec853a31c6a096ff7bf0d49a39a60bd112f5f73bf44fa92d8e9fbed6f8")
.limit(1)
.order(RequestBuilderOrder.DESC)
.execute();
Expand Down

0 comments on commit 26ea8f2

Please sign in to comment.