Skip to content

Commit

Permalink
[ABW-1547] Ledger signing++ (#549)
Browse files Browse the repository at this point in the history
  • Loading branch information
kugel3 committed Jun 5, 2023
1 parent 8c1814b commit e6b5ac2
Show file tree
Hide file tree
Showing 59 changed files with 1,224 additions and 1,203 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "14.3"
xcode-version: "14.3.1"

- uses: webfactory/ssh-agent@v0.6.0
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "14.3"
xcode-version: "14.3.1"

- name: "Set up ruby"
uses: ruby/setup-ruby@v1
Expand Down
2 changes: 1 addition & 1 deletion .xcode-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.3
14.3.1
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ extension LedgerHardwareWalletFactorSource {
throw UnrecognizedLedgerModel(model: hint.model.rawValue)
}
return P2P.LedgerHardwareWallet.LedgerDevice(
name: NonEmptyString(maybeString: self.hint.name.rawValue),
name: NonEmptyString(maybeString: hint.name),
id: Data(id.hexCodable.data.dropFirst()).hex, // Connector Extension only cares about the hash not the factor source ID prefix.
model: model
)
Expand Down
8 changes: 4 additions & 4 deletions Sources/Clients/ProfileStore/ProfileStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -407,10 +407,10 @@ extension ProfileStore {
#endif

internal static func deviceDescription(
name: DeviceFactorSource.Hint.Name,
name: String,
model: DeviceFactorSource.Hint.Model
) -> NonEmptyString {
"\(name.rawValue) (\(model.rawValue))"
"\(name) (\(model.rawValue))"
}
}

Expand Down Expand Up @@ -512,11 +512,11 @@ extension ProfileStore {
@Dependency(\.secureStorageClient) var secureStorageClient

do {
let name: DeviceFactorSource.Hint.Name
let name: String
let model: DeviceFactorSource.Hint.Model
#if canImport(UIKit)
@Dependency(\.device) var device
name = await .init(rawValue: device.name)
name = await device.name
model = await .init(rawValue: device.model)
#else
name = macOSDeviceNameFallback
Expand Down
2 changes: 1 addition & 1 deletion Sources/Core/FeaturePrelude/LedgerRowView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public struct LedgerRowView: View {
let lastUsedOn: Date

public init(factorSource: LedgerHardwareWalletFactorSource) {
self.description = factorSource.hint.name.rawValue
self.description = factorSource.hint.name
self.addedOn = factorSource.addedOn
self.lastUsedOn = factorSource.lastUsedOn
}
Expand Down
25 changes: 25 additions & 0 deletions Sources/Core/FeaturePrelude/SlideUpPanel/SlideUpPanel+View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,31 @@ extension SlideUpPanel.State {
}
}

// MARK: - WithNavigationBar
public struct WithNavigationBar<Content: View>: View {
private let closeAction: () -> Void
private let content: Content

public init(closeAction: @escaping () -> Void, @ViewBuilder content: () -> Content) {
self.content = content()
self.closeAction = closeAction
}

public var body: some View {
NavigationStack {
content
.presentationDragIndicator(.visible)
#if os(iOS)
.toolbar {
ToolbarItem(placement: .primaryAction) {
CloseButton(action: closeAction)
}
}
#endif
}
}
}

// MARK: - SlideUpPanel.View
extension SlideUpPanel {
public struct ViewState: Equatable {
Expand Down
77 changes: 0 additions & 77 deletions Sources/Core/FeaturePrelude/UseLedgerView/UseLedgerView.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public enum AssetResource {
public static let radioButtonLightDisabled = ImageAsset(name: "radioButton-light-disabled")
public static let radioButtonLightSelected = ImageAsset(name: "radioButton-light-selected")
public static let radioButtonLightUnselected = ImageAsset(name: "radioButton-light-unselected")
public static let signingKey = ImageAsset(name: "signing-key")
public static let trash = ImageAsset(name: "trash")
public static let homeAccountSecurity = ImageAsset(name: "home-account-security")
public static let homeAggregatedValueHidden = ImageAsset(name: "home-aggregatedValue-hidden")
Expand Down
Loading

0 comments on commit e6b5ac2

Please sign in to comment.