[#560] Remove QR code scanning from the home screen (#571)

Closes #560
This commit is contained in:
Francisco Gindre 2023-02-22 14:37:36 -03:00 committed by GitHub
parent 7967fac627
commit 60f19a360d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 44 deletions

View File

@ -3261,6 +3261,7 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
@ -3287,6 +3288,7 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = secantTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
@ -3307,6 +3309,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = secantUITests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
@ -3327,6 +3330,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = secantUITests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (

View File

@ -18,7 +18,6 @@ struct HomeReducer: ReducerProtocol {
case request
case transactionHistory
case send
case scan
case balanceBreakdown
}
@ -64,7 +63,6 @@ struct HomeReducer: ReducerProtocol {
case request(RequestReducer.Action)
case rewindDone(Bool, SettingsReducer.Action)
case send(SendFlowReducer.Action)
case scan(ScanReducer.Action)
case synchronizerStateChanged(SDKSynchronizerState)
case walletEvents(WalletEventsFlowReducer.Action)
case updateDestination(HomeReducer.State.Destination?)
@ -87,10 +85,6 @@ struct HomeReducer: ReducerProtocol {
SendFlowReducer()
}
Scope(state: \.scanState, action: /Action.scan) {
ScanReducer()
}
Scope(state: \.profileState, action: /Action.profile) {
ProfileReducer()
}
@ -184,13 +178,6 @@ struct HomeReducer: ReducerProtocol {
case .send:
return .none
case .scan(.found):
audioServices.systemSoundVibrate()
return EffectTask(value: .updateDestination(nil))
case .scan:
return .none
case .balanceBreakdown(.onDisappear):
state.destination = nil
return .none
@ -236,13 +223,6 @@ extension HomeStore {
)
}
func scanStore() -> ScanStore {
self.scope(
state: \.scanState,
action: HomeReducer.Action.scan
)
}
func balanceBreakdownStore() -> BalanceBreakdownStore {
self.scope(
state: \.balanceBreakdownState,

View File

@ -8,8 +8,6 @@ struct HomeView: View {
WithViewStore(store) { viewStore in
VStack {
ZStack {
scanButton(viewStore)
profileButton(viewStore)
circularArea(viewStore)
@ -94,28 +92,6 @@ extension HomeView {
Spacer()
}
}
func scanButton(_ viewStore: HomeViewStore) -> some View {
VStack {
HStack {
Image(Asset.Assets.Icons.qrCode.name)
.resizable()
.frame(width: 40, height: 40)
.padding(.top, 7)
.padding(.leading, 22)
.navigationLink(
isActive: viewStore.bindingForDestination(.scan),
destination: {
ScanView(store: store.scanStore())
}
)
Spacer()
}
Spacer()
}
}
func circularArea(_ viewStore: HomeViewStore) -> some View {
VStack {