Skip to content

Commit

Permalink
SideSwap 1.5.4
Browse files Browse the repository at this point in the history
- GDK ssl fix
  • Loading branch information
sideswap-io committed Jun 11, 2024
1 parent 14840bf commit 8b474aa
Show file tree
Hide file tree
Showing 47 changed files with 608 additions and 1,593 deletions.
4 changes: 2 additions & 2 deletions lib/app_version.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const appVersion = '1.5.3';
const appBuildNumber = 97;
const appVersion = '1.5.4';
const appBuildNumber = 99;

const appVersionFull = '$appVersion+$appBuildNumber';
53 changes: 29 additions & 24 deletions lib/desktop/main/d_order_review.dart
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,7 @@ class DOrderReview extends HookConsumerWidget {
final autoSignPrev = useState(true);
final isTracking = useState(order.isTracking);
final controllerPrice = useTextEditingController();

final priceTrackerValue =
useState(indexPriceToTrackerValue(order.indexPrice));
final priceTrackerValue = useState(.0);

useEffect(() {
if (screen == ReviewScreen.edit) {
Expand Down Expand Up @@ -374,27 +372,34 @@ class DOrderReview extends HookConsumerWidget {
builder: (context, ref, child) {
final isJadeWallet = ref.watch(isJadeWalletProvider);

return switch (screen) {
ReviewScreen.edit ||
ReviewScreen.submitStart
when (isJadeWallet || isTracking.value) =>
const DOrderReviewSignTypeControls(
onTwoStepChanged: null,
),
ReviewScreen.submitStart =>
DOrderReviewSignTypeControls(
onTwoStepChanged: (bool value) {
ref
.read(orderReviewTwoStepProvider.notifier)
.setTwoStep(value);

if (value) {
autoSign.value = true;
}
},
),
_ => const SizedBox(),
};
if (screen == ReviewScreen.edit) {
return const DOrderReviewSignTypeControls(
onTwoStepChanged: null,
);
}

// turn off online for jade wallet
if (isJadeWallet && screen == ReviewScreen.submitStart) {
return const DOrderReviewSignTypeControls(
onTwoStepChanged: null,
);
}

if (screen == ReviewScreen.submitStart) {
return DOrderReviewSignTypeControls(
onTwoStepChanged: (bool value) {
ref
.read(orderReviewTwoStepProvider.notifier)
.setTwoStep(value);

if (value) {
autoSign.value = true;
}
},
);
}

return const SizedBox();
},
),
if (screen == ReviewScreen.submitStart ||
Expand Down
4 changes: 1 addition & 3 deletions lib/providers/balances_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,7 @@ Decimal amountUsdInDefaultCurrency(
AmountUsdInDefaultCurrencyRef ref, String? assetId, num amount) {
final amountUsd = ref.watch(amountUsdProvider(assetId, amount));
final rateMultiplier = ref.watch(defaultConversionRateMultiplierProvider);
final amountUsdInDefaultCurrencyString =
(amountUsd * rateMultiplier).toStringAsFixed(2);
return Decimal.tryParse(amountUsdInDefaultCurrencyString) ?? Decimal.zero;
return amountUsd * rateMultiplier;
}

@riverpod
Expand Down
1 change: 0 additions & 1 deletion lib/screens/markets/widgets/modify_price_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ class ModifyPriceDialogState extends ConsumerState<ModifyPriceDialog> {
invertColors: inversePrice,
),
),
const Spacer(),
Padding(
padding: const EdgeInsets.only(top: 16),
child: CustomBigButton(
Expand Down
20 changes: 11 additions & 9 deletions lib/screens/markets/widgets/order_price_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class OrderPriceField extends ConsumerWidget {
ref.watch(assetUtilsProvider).isAssetToken(assetId: asset?.assetId);
final marketType = getMarketType(productAsset);
final indexPriceStr = ref
.watch(indexPriceForAssetProvider(productAsset?.assetId))
.watch(indexPriceForAssetProvider(asset?.assetId))
.getIndexPriceStr();
final lastPriceStr =
ref.watch(lastStringIndexPriceForAssetProvider(productAsset?.assetId));
Expand All @@ -74,24 +74,26 @@ class OrderPriceField extends ConsumerWidget {
children: [
Builder(
builder: (context) {
if (indexPriceStr.isEmpty && lastPriceStr.isEmpty) {
if (marketType == MarketType.stablecoin &&
indexPriceStr.isEmpty ||
marketType != MarketType.stablecoin &&
lastPriceStr.isEmpty) {
return const SizedBox();
}

return GestureDetector(
onTap: () {
setControllerValue(
controller,
indexPriceStr.isNotEmpty
? indexPriceStr
: lastPriceStr,
);
controller,
marketType == MarketType.stablecoin
? indexPriceStr
: lastPriceStr);
},
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
indexPriceStr.isNotEmpty
marketType == MarketType.stablecoin
? 'Index price:'.tr()
: 'Last price:'.tr(),
style: const TextStyle(
Expand All @@ -101,7 +103,7 @@ class OrderPriceField extends ConsumerWidget {
),
),
Text(
indexPriceStr.isNotEmpty
marketType == MarketType.stablecoin
? '${replaceCharacterOnPosition(input: indexPriceStr)} ${asset?.ticker ?? ''}'
: '$lastPriceStr L-BTC',
style: const TextStyle(
Expand Down
4 changes: 2 additions & 2 deletions lib/screens/markets/widgets/order_price_text_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class OrderPriceTextField extends ConsumerWidget {
),
),
Padding(
padding: const EdgeInsets.only(bottom: 20),
padding: const EdgeInsets.only(bottom: 17),
child: SizedBox(
height: 29,
child: Row(
Expand Down Expand Up @@ -111,7 +111,7 @@ class OrderPriceTextField extends ConsumerWidget {
),
),
SizedBox(
width: 157,
width: 160,
child: Padding(
padding: const EdgeInsets.only(left: 14),
child: TextField(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Sideswap Client.

publish_to: "none" # Remove this line if you wish to publish to pub.dev

version: 1.5.3+97
version: 1.5.4+99

environment:
sdk: ">=3.3.0 <4.0.0"
Expand Down
30 changes: 1 addition & 29 deletions rust/Cargo.lock

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

3 changes: 0 additions & 3 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ resolver = "2"

members = [
"sideswap_amp",
"sideswap_amp_dealer",
"sideswap_api",
"sideswap_client",
"sideswap_common",
Expand All @@ -24,7 +23,6 @@ members = [
[workspace.dependencies]
allo-isolate = "0.1"
anyhow = "1.0"
arc-swap = "1.7.1"
async-trait = "0.1"
axum = { version = "0.7", default_features = false, features = ["form", "http1", "json", "matched-path", "query", "tokio"] }
base64 = "0.21"
Expand All @@ -49,7 +47,6 @@ futures-channel = "0.3"
futures-util = "0.3"
git2 = { version = "0.18", default-features = false }
hex = "0.4"
hex-literal = "0.4.1"
libc = "0.2"
log = "0.4"
log4rs = { version = "1.2", features = ["gzip"] }
Expand Down
Loading

0 comments on commit 8b474aa

Please sign in to comment.