Skip to content

Commit

Permalink
1.11.4 hotfixes (#1433)
Browse files Browse the repository at this point in the history
Co-authored-by: matiasbzurovski <164921079+matiasbzurovski@users.noreply.github.com>
Co-authored-by: Alexander Cyon <116169792+CyonAlexRDX@users.noreply.github.com>
Co-authored-by: Albert Perez <albert.toro@rdx.works>
  • Loading branch information
4 people authored Feb 20, 2025
1 parent a7e9b30 commit 71147b8
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 36 deletions.
2 changes: 1 addition & 1 deletion Aux/Config/Common.xcconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// MARK: - Custom flags

/// Application version shared across all targets and flavours
APP_VERSION = 1.11.3
APP_VERSION = 1.11.5

/// App Icon base name
APP_ICON = AppIcon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,6 @@ extension ResourceAmount {
case var .atLeast(exactAmount):
exactAmount.fiatWorth = change(resourceAddress, exactAmount)
self = .atLeast(exactAmount)
case var .atMost(exactAmount):
exactAmount.fiatWorth = change(resourceAddress, exactAmount)
self = .atMost(exactAmount)
case var .between(minExactAmount, maxExactAmount):
minExactAmount.fiatWorth = change(resourceAddress, minExactAmount)
maxExactAmount.fiatWorth = change(resourceAddress, maxExactAmount)
Expand Down
10 changes: 3 additions & 7 deletions RadixWallet/Core/SharedModels/Assets/ResourceAmount.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import Sargon
enum ResourceAmount: Sendable, Hashable, Codable {
case exact(ExactResourceAmount)
case atLeast(ExactResourceAmount)
case atMost(ExactResourceAmount)
case between(minimum: ExactResourceAmount, maximum: ExactResourceAmount)
case predicted(predicted: ExactResourceAmount, guaranteed: ExactResourceAmount)
case unknown
Expand All @@ -15,13 +14,14 @@ enum ResourceAmount: Sendable, Hashable, Codable {
self = .exact(amount)
case let .atLeast(amount):
self = .atLeast(.init(nominalAmount: amount))
case let .atMost(amount):
self = .atMost(.init(nominalAmount: amount))
case let .between(minAmount, maxAmount):
self = .between(
minimum: .init(nominalAmount: minAmount),
maximum: .init(nominalAmount: maxAmount)
)
case .atMost:
// AtMost is considered unknown in the Wallet as per https://radixdlt.atlassian.net/browse/ABW-4040
self = .unknown
case .unknownAmount:
self = .unknown
}
Expand Down Expand Up @@ -74,8 +74,6 @@ extension ResourceAmount {
return .exact(adjust(amount.nominalAmount))
case let .atLeast(amount):
return .atLeast(.init(nominalAmount: adjust(amount.nominalAmount)))
case let .atMost(amount):
return .atMost(.init(nominalAmount: adjust(amount.nominalAmount)))
case let .between(minAmount, maxAmount):
let min = adjust(minAmount.nominalAmount)
let max = adjust(maxAmount.nominalAmount)
Expand Down Expand Up @@ -112,8 +110,6 @@ extension ResourceAmount: CustomDebugStringConvertible {
amount.nominalAmount.formatted()
case let .atLeast(amount):
"At least \(amount.nominalAmount.formatted())"
case let .atMost(amount):
"No more than \(amount.nominalAmount.formatted())"
case let .between(minAmount, maxAmount):
"Min: \(minAmount.nominalAmount.formatted()); Max: \(maxAmount.nominalAmount.formatted())"
case let .predicted(predicted, guaranteed):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,12 +517,9 @@ extension ResourceBalanceView {
}

if case .unknown = amount {
StatusMessageView(
text: L10n.InteractionReview.Unknown.amount,
type: .warning,
useNarrowSpacing: true,
useSmallerFontSize: true
)
Text(L10n.InteractionReview.Unknown.amount)
.textStyle(.body2HighImportance)
.foregroundStyle(.app.gray2)
}
}
}
Expand Down Expand Up @@ -566,12 +563,9 @@ extension ResourceBalanceView {
}

if case .unknown = amount {
StatusMessageView(
text: L10n.InteractionReview.Unknown.amount,
type: .warning,
useNarrowSpacing: true,
useSmallerFontSize: true
)
Text(L10n.InteractionReview.Unknown.amount)
.textStyle(.body2HighImportance)
.foregroundStyle(.app.gray2)
}
}
}
Expand Down Expand Up @@ -653,13 +647,6 @@ extension ResourceBalanceView {
appearance: appearance,
symbol: symbol
)
case let .atMost(exactAmount):
SubAmountView(
title: L10n.InteractionReview.noMoreThan,
amount: exactAmount,
appearance: appearance,
symbol: symbol
)
case let .between(minAmount, maxAmount):
VStack(alignment: alignment, spacing: .small3) {
SubAmountView(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ extension InteractionReview.Sections {
return nil

case .general, .transfer:
if summary.detailedClassification == .general {
guard !summary.deposits.isEmpty || !summary.withdrawals.isEmpty else { return nil }
}

let resourcesInfo = try await resourcesInfo(allAddresses.elements)
let withdrawals = try await extractWithdrawals(
accountWithdraws: summary.withdrawals,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ struct OnboardingCoordinator: Sendable, FeatureReducer {
_ = await radixConnectClient.loadP2PLinksAndConnectAll()
}

case .createAccount(.delegate(.dismissed)):
return .run { _ in
// Clear out the ephemeral profile created on `setupNewUser`
try await SargonOS.shared.deleteWallet()
} catch: { error, _ in
errorQueue.schedule(error)
}

default:
return .none
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ extension PreAuthorizationReview.State {
var isExpired: Bool {
switch expiration {
case let .atTime(value):
value.date <= Date.now
value.date <= Date.now || secondsToExpiration == 0
case .afterDelay:
false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ extension Account {
var derivationIndex: HdPathComponent {
guard let unsecuredControllingFactorInstance else {
// TODO: Remove, temporary to accomodate securified state
return HdPathComponent.sample
return try! HdPathComponent.securifiedComponent(.init(localKeySpace: 0))
}

return unsecuredControllingFactorInstance.derivationPath.lastPathComponent
Expand Down

0 comments on commit 71147b8

Please sign in to comment.