Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ABW-3976] Shield Setup - Recovery & Confirmation #1442

Merged
merged 83 commits into from
Jan 21, 2025
Merged
Changes from 1 commit
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
855b052
WIP
matiasbzurovski Dec 3, 2024
83c90d8
WIP
matiasbzurovski Dec 3, 2024
9461ca4
wip
matiasbzurovski Dec 3, 2024
91a7750
WIP
matiasbzurovski Dec 3, 2024
7075d5a
WIP
matiasbzurovski Dec 3, 2024
afec155
WIP
matiasbzurovski Dec 4, 2024
42cdda1
WIP
matiasbzurovski Dec 4, 2024
047c39b
renames
matiasbzurovski Dec 4, 2024
8a159c0
add assets
matiasbzurovski Dec 4, 2024
e8cb1ad
WIP
matiasbzurovski Dec 4, 2024
03fcc1e
latest renames
matiasbzurovski Dec 4, 2024
3750ff0
remove test code
matiasbzurovski Dec 4, 2024
39fe0f7
lint
matiasbzurovski Dec 4, 2024
bcd3688
WIP
matiasbzurovski Dec 4, 2024
78ef00b
Almost working
matiasbzurovski Dec 5, 2024
6e15922
add new Path view
matiasbzurovski Dec 5, 2024
27611b4
Revert "add new Path view"
matiasbzurovski Dec 5, 2024
a51d2a7
fix by manually scoping
matiasbzurovski Dec 5, 2024
d326aae
localisation
matiasbzurovski Dec 5, 2024
11d72ef
show todo when selecting other factor
matiasbzurovski Dec 5, 2024
958f10c
feedback
matiasbzurovski Dec 5, 2024
b207add
local Sargon
matiasbzurovski Dec 5, 2024
9d5d89f
use Sargon
matiasbzurovski Dec 5, 2024
acf76d3
updates to compile
matiasbzurovski Dec 6, 2024
4d788d4
renames
matiasbzurovski Dec 6, 2024
c539993
wip
danvleju-rdx Dec 6, 2024
aac36db
wip
danvleju-rdx Dec 6, 2024
c9f32cd
Merge branch 'main' into ABW-3970-shield-setup-select-factors
danvleju-rdx Dec 8, 2024
08414fd
wip
danvleju-rdx Dec 9, 2024
da548c6
Merge branch 'main' into ABW-3970-shield-setup-select-factors
danvleju-rdx Dec 9, 2024
8d1510a
wip
danvleju-rdx Dec 9, 2024
56101fb
lint
danvleju-rdx Dec 9, 2024
d096512
remove temp strings
danvleju-rdx Dec 9, 2024
266bfe7
Merge branch 'main' into ABW-3970-shield-setup-select-factors
danvleju-rdx Dec 9, 2024
906e909
Merge branch 'main' into ABW-3970-shield-setup-select-factors
danvleju-rdx Dec 18, 2024
80588ee
[no ci] wip
danvleju-rdx Jan 6, 2025
b9e3487
wip
danvleju-rdx Jan 6, 2025
96d257f
wip
danvleju-rdx Jan 6, 2025
7e48a75
[no ci] onboarding image updates
danvleju-rdx Jan 6, 2025
47798b5
[no ci] wip
danvleju-rdx Jan 6, 2025
94afa9b
[no ci] wip
danvleju-rdx Jan 6, 2025
dd7d87b
Merge branch 'main' into ABW-3970-shield-setup-select-factors
danvleju-rdx Jan 6, 2025
16827c1
fix
danvleju-rdx Jan 6, 2025
522b006
address feedback
danvleju-rdx Jan 7, 2025
aca11ad
Merge branch 'main' into ABW-3970-shield-setup-select-factors
danvleju-rdx Jan 7, 2025
9d67d6d
strings
danvleju-rdx Jan 7, 2025
415c393
wip
danvleju-rdx Jan 7, 2025
369ee67
address feedback
danvleju-rdx Jan 7, 2025
59b7c6f
Merge branch 'ABW-3970-shield-setup-select-factors' into ABW-3973-shi…
danvleju-rdx Jan 7, 2025
515fac8
wip
danvleju-rdx Jan 8, 2025
f44ee15
wip
danvleju-rdx Jan 8, 2025
9fd6acb
wip
danvleju-rdx Jan 8, 2025
b48ba08
wip
danvleju-rdx Jan 9, 2025
4ece1c8
Merge branch 'main' into ABW-3973-shield-setup-regular-access
danvleju-rdx Jan 9, 2025
ae5aae4
wip
danvleju-rdx Jan 9, 2025
ed104a4
wip
danvleju-rdx Jan 9, 2025
c21de1b
wip
danvleju-rdx Jan 9, 2025
7b96f3e
wip
danvleju-rdx Jan 9, 2025
5811340
wip
danvleju-rdx Jan 9, 2025
e9fddc0
rename
danvleju-rdx Jan 9, 2025
fc9e9a0
address feedback
danvleju-rdx Jan 9, 2025
c3e2caa
Update RadixWallet/Core/DesignSystem/Styles/SecondaryRectangularButto…
danvleju-rdx Jan 9, 2025
19e76c6
Merge branch 'main' into ABW-3973-shield-setup-regular-access
danvleju-rdx Jan 10, 2025
57df67c
fix
danvleju-rdx Jan 10, 2025
a04c09a
add chooseFactorSource
danvleju-rdx Jan 10, 2025
5dc5bd7
wip
danvleju-rdx Jan 13, 2025
3fca6cb
wip
danvleju-rdx Jan 13, 2025
a363015
Merge branch 'main' into ABW-3976-shield-setup-recovery
danvleju-rdx Jan 13, 2025
d33d9d8
wip
danvleju-rdx Jan 14, 2025
b3a465b
sargon updates
danvleju-rdx Jan 15, 2025
f3e200c
wip
danvleju-rdx Jan 15, 2025
f539def
wip
danvleju-rdx Jan 15, 2025
4b84fd3
add TODOs
danvleju-rdx Jan 15, 2025
812bb17
Merge branch 'main' into ABW-3976-shield-setup-recovery
danvleju-rdx Jan 16, 2025
8038105
wip
danvleju-rdx Jan 21, 2025
d00d400
Revert "wip"
danvleju-rdx Jan 21, 2025
a8dc84e
1.11.1 hotfix (#1417)
GhenadieVP Jan 17, 2025
89bd574
Debug Only: Inspect `FactorInstancesCache` (#1391)
CyonAlexRDX Jan 20, 2025
7efd3ca
New Crowdin updates (#1439)
radixbot Jan 21, 2025
602fb0d
sargon bump
danvleju-rdx Jan 21, 2025
68dfebc
New Crowdin updates (#1439)
radixbot Jan 21, 2025
3d23bf3
strings
danvleju-rdx Jan 21, 2025
f9502af
strings
danvleju-rdx Jan 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wip
  • Loading branch information
matiasbzurovski committed Dec 5, 2024
commit 9461ca4f6debf7cc6d814e1085f66b294aa45df3
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "iconSecurityFactors.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,23 +1,63 @@
import SwiftUI

// MARK: - AddHardwareFactor.View
// MARK: - PrepareFactors.AddHardwareFactor.View
extension PrepareFactors.AddHardwareFactor {
struct View: SwiftUI.View {
let store: StoreOf<PrepareFactors.AddHardwareFactor>

var body: some SwiftUI.View {
WithPerceptionTracking {
VStack {
Text("Add a Hadware Device")
Spacer()
ScrollView {
VStack(spacing: .large2) {
Image(.iconSecurityFactors)

Text("Add a Hardware Device")
.textStyle(.sheetTitle)
.padding(.horizontal, .medium3)

Text("Choose a hardware device to use as a security factor in your Shield.")
.textStyle(.body1Regular)
.padding(.horizontal, .medium2)

VStack(spacing: .medium3) {
card(.arculusCard)
card(.ledgerHqHardwareWallet)
}

Spacer()
}
.foregroundStyle(.app.gray1)
.multilineTextAlignment(.center)
.padding(.horizontal, .medium3)
}
.footer {
Button("Add Hardware Device") {
store.send(.view(.addButtonTapped))
VStack(spacing: .small2) {
Button("Add Hardware Device") {
store.send(.view(.addButtonTapped))
}
.buttonStyle(.primaryRectangular)
.controlState(store.controlState)

Button("I don’t have a hardware device") {
store.send(.view(.noDeviceButtonTapped))
}
.buttonStyle(.alternativeRectangular)
}
.buttonStyle(.primaryRectangular)
}
}
}

private func card(_ factorSource: FactorSourceKind) -> some SwiftUI.View {
FactorSourceCard(kind: .genericDescription(factorSource), mode: .selection(type: .radioButton, isSelected: store.selected == factorSource))
.onTapGesture {
store.send(.view(.selected(factorSource)))
}
}
}
}

private extension PrepareFactors.AddHardwareFactor.State {
var controlState: ControlState {
selected == nil ? .disabled : .enabled
}
}
Original file line number Diff line number Diff line change
@@ -3,13 +3,15 @@ extension PrepareFactors {
struct AddHardwareFactor: Sendable, FeatureReducer {
@ObservableState
struct State: Sendable, Hashable {
init() {}
var selected: FactorSourceKind?
}

typealias Action = FeatureAction<Self>

enum ViewAction: Sendable, Equatable {
case selected(FactorSourceKind)
case addButtonTapped
case noDeviceButtonTapped
}

enum DelegateAction: Sendable, Equatable {
@@ -22,9 +24,15 @@ extension PrepareFactors {

func reduce(into state: inout State, viewAction: ViewAction) -> Effect<Action> {
switch viewAction {
case let .selected(value):
state.selected = value
return .none
case .addButtonTapped:
// Present flow to add Ledger or Arculus
.send(.delegate(.addedFactorSource))
return .send(.delegate(.addedFactorSource))
case .noDeviceButtonTapped:
// Present alert
return .none
}
}
}
Original file line number Diff line number Diff line change
@@ -25,9 +25,9 @@ extension PrepareFactors.Intro {

Spacer()
}
.padding(.horizontal, .large2)
.foregroundStyle(.app.gray1)
.multilineTextAlignment(.center)
.padding(.horizontal, .large2)
.footer {
Button("Start") {
store.send(.view(.startButtonTapped))