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

chore: Bringing DashPay into the project #578

Merged
merged 87 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
c5ec0ca
feat: Prepare DashPay target
tikhop Jun 13, 2023
fd73c30
feat(ui): Show 'Join DashPay' button
tikhop Jun 13, 2023
aa9baf5
feat: Update DashPay models and setup flow
tikhop Jun 13, 2023
2a282c0
feat: Show profile view on home screen
tikhop Jun 13, 2023
79a749a
feat: Moving DashPay features into wallet
tikhop Jun 19, 2023
8f443f6
refactor: Re-org DashPay structure
tikhop Jun 19, 2023
1d159e2
fix: DashWallet compilation issues
tikhop Jun 20, 2023
4e234cd
feat(ui): Show user profile on more screen
tikhop Jun 21, 2023
314b16a
chore: Merge branch 'develop' into feature/dashpay
tikhop Jun 21, 2023
f511cc1
Merge branch 'develop' into feature/dashpay
tikhop Jun 22, 2023
baa6f56
Merge branch 'develop' into feature/dashpay
tikhop Jul 3, 2023
f3b0619
chore: Merge branch 'develop' into feature/dashpay
tikhop Jul 9, 2023
a672923
fix: Project structure
tikhop Jul 10, 2023
310482b
chore: Merge branch 'develop' into feature/dashpay
tikhop Jul 10, 2023
7a99b70
Merge branch 'develop' into feature/dashpay
tikhop Jul 21, 2023
4922418
chore: Update localizations
tikhop Jul 21, 2023
a118259
Merge branch 'develop' into feature/dashpay
tikhop Jul 27, 2023
48a0964
fix: DWTxDetailModel name
Syn-McJ Aug 4, 2023
16d6ef1
feat: Contacts and Explore in the main tabbar
Syn-McJ Aug 4, 2023
3924f4c
feat: tabbar icons
Syn-McJ Aug 5, 2023
39c957b
feat: explore events handling
Syn-McJ Aug 5, 2023
7d6068d
chore: username mocking
Syn-McJ Aug 5, 2023
c698a34
feat: username search mocking
Syn-McJ Aug 7, 2023
421cd9f
Merge branch 'feature/dashpay-contacts-search' into feature/dashpay-c…
Syn-McJ Aug 7, 2023
fb6d609
fix: wallet build fix
Syn-McJ Aug 7, 2023
996cf38
chore: Merge pull request #584 from Syn-McJ/feature/dashpay-contacts-…
tikhop Aug 8, 2023
e6786c4
fix: restore hourglass icons to fix a crash
Syn-McJ Aug 10, 2023
4204306
feat: add contact mocking
Syn-McJ Aug 10, 2023
c61af34
Merge pull request #586 from Syn-McJ/feature/dashpay-add-contact
Syn-McJ Aug 11, 2023
c06c6a9
feat: restore registration flow from the home screen
Aug 13, 2023
508f671
feat: registration flow from More
Syn-McJ Aug 15, 2023
50296d7
chore: cleanup
Syn-McJ Aug 15, 2023
26eb6f2
Merge pull request #590 from Syn-McJ/feature/dashpay-registration-flow
Syn-McJ Aug 15, 2023
3d946e5
chore: restore profile header
Syn-McJ Aug 16, 2023
ae4e388
fix: restoring icons and fixing Edit Profile crash
Syn-McJ Aug 16, 2023
78f0f9d
Merge pull request #591 from Syn-McJ/feature/dashpay-view-profile
Syn-McJ Aug 19, 2023
6d8a841
fix: update 'Join DashPay' header with balance change
Syn-McJ Aug 19, 2023
e662941
chore: mock notifications
Syn-McJ Aug 21, 2023
48842fa
fix: wallet build
Syn-McJ Aug 21, 2023
222a4ad
fix: execute completeRegistration when closing DWRegistrationComplete…
Syn-McJ Aug 23, 2023
b15ae17
feat: mock accept contact
Syn-McJ Aug 23, 2023
47b7d57
fix: crash on mocked contact accept
Syn-McJ Aug 24, 2023
7ab9591
fix: change the label of PIN code when creating invitations
Syn-McJ Aug 25, 2023
d378b73
chore: restore invitations
Syn-McJ Aug 25, 2023
fc873c3
feat: restore invitations (receive)
Syn-McJ Aug 27, 2023
b07b18f
fix: check sync state before running handleDeeplink again
Syn-McJ Aug 27, 2023
8176f4d
Merge pull request #592 from Syn-McJ/feature/dashpay-notifications
Syn-McJ Aug 28, 2023
2375d3d
feat: restore 'pay to contact' flow
Syn-McJ Aug 28, 2023
d0048a5
Merge branch 'feature/dashpay' into feature/dashpay-invitations
Syn-McJ Aug 29, 2023
3177d7b
Merge pull request #594 from Syn-McJ/feature/dashpay-invitations
Syn-McJ Aug 29, 2023
8b9d601
Merge branch 'feature/dashpay' into feature/dashpay-payments
Syn-McJ Aug 29, 2023
e4be59b
Merge branch 'develop' into feature/dashpay
Syn-McJ Aug 30, 2023
0ffadb5
Merge branch 'feature/dashpay' into feature/dashpay-payments
Syn-McJ Aug 30, 2023
01ed55b
Merge branch 'develop' into feature/dashpay
tikhop Aug 30, 2023
3bf7924
feat: mocking outgoing tx for contacts
Syn-McJ Sep 2, 2023
3bb8644
fix: dashwallet build
Syn-McJ Sep 2, 2023
6dfd36a
chore: clenup
Syn-McJ Sep 2, 2023
86c8196
Merge branch 'develop' into feature/dashpay-payments
Syn-McJ Sep 6, 2023
5de5378
Merge branch 'feature/dashpay' into feature/dashpay-payments
Syn-McJ Sep 6, 2023
69374a0
chore: cleanup
Syn-McJ Sep 6, 2023
55cfacc
Merge pull request #597 from Syn-McJ/feature/dashpay-payments
Syn-McJ Sep 6, 2023
0087891
Merge branch 'develop' into feature/dashpay
Syn-McJ Sep 13, 2023
fca152b
feat: send to contact UI
Syn-McJ Sep 14, 2023
200bbc7
feat: receive screen & username
Syn-McJ Sep 15, 2023
3231365
Merge branch 'develop' into feature/dashpay
Syn-McJ Sep 16, 2023
5ead83d
Merge pull request #601 from Syn-McJ/feature/dashpay
Syn-McJ Sep 18, 2023
fe7f26d
feat: moving notification indicator and user profile to the top bar
Syn-McJ Sep 18, 2023
f7a533b
fix: don't show right button if no identity
Syn-McJ Sep 19, 2023
7d2b554
fix: make header view smaller
Syn-McJ Sep 19, 2023
29cdbd4
fix: redraw Join Dashpay on status change
Syn-McJ Sep 19, 2023
d2bb77e
Merge pull request #603 from Syn-McJ/feature/dashpay-send-ui
Syn-McJ Sep 19, 2023
2ce3f4a
Merge pull request #604 from Syn-McJ/feature/dashpay-home-screen
Syn-McJ Sep 19, 2023
f525dae
feat: coinjoin entry point
Syn-McJ Oct 9, 2023
c9472d9
chore: cleanup
Syn-McJ Oct 9, 2023
d16727a
chore: add coinjoin to acceptable scopes
Syn-McJ Oct 9, 2023
423f6cb
Merge pull request #608 from Syn-McJ/feature/coinjoin-entry-point
Syn-McJ Oct 9, 2023
ff9820c
Merge branch 'develop' into feature/coinjoin-levels
Syn-McJ Oct 18, 2023
f290695
feat: levels UI
Syn-McJ Oct 19, 2023
71df6df
feat: levels changing and dialogs
Syn-McJ Oct 21, 2023
d428eae
fix: crowdnode storyboard
Syn-McJ Oct 21, 2023
e5ffbd4
feat: voting entrypoint
Syn-McJ Oct 22, 2023
b3391db
fix: cleanup
Syn-McJ Oct 23, 2023
78bf5e6
fix: add voting to PR titles
Syn-McJ Oct 23, 2023
8055af2
Merge pull request #612 from Syn-McJ/feature/voting-entrypoint
Syn-McJ Oct 24, 2023
b3c6fb5
Merge branch 'feature/dashpay' into feature/coinjoin-levels
Syn-McJ Oct 24, 2023
f1875fd
Merge pull request #613 from Syn-McJ/feature/coinjoin-levels
Syn-McJ Oct 24, 2023
ca1221d
Merge branch 'develop' into feature/dashpay
Syn-McJ Oct 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions DashPay/Assets/DPAssets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
23 changes: 23 additions & 0 deletions DashPay/Assets/DPAssets.xcassets/icon_info.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "icon_info.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "pay_user_accessory.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//
// Created by Andrew Podkovyrin
// Copyright © 2021 Dash Core Group. All rights reserved.
//
// Licensed under the MIT License (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://opensource.org/licenses/MIT
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@class DWFullScreenModalControllerViewController;

@protocol DWFullScreenModalControllerViewControllerDelegate <NSObject>

- (void)fullScreenModalControllerViewControllerDidCancel:(DWFullScreenModalControllerViewController *)controller;

@end

@interface DWFullScreenModalControllerViewController : UIViewController

@property (nullable, nonatomic, weak) id<DWFullScreenModalControllerViewControllerDelegate> delegate;

- (instancetype)initWithController:(UIViewController *)controller;

- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithNibName:(nullable NSString *)nibNameOrNil
bundle:(nullable NSBundle *)nibBundleOrNil NS_UNAVAILABLE;
- (instancetype)initWithCoder:(nullable NSCoder *)coder NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
//
// Created by Andrew Podkovyrin
// Copyright © 2021 Dash Core Group. All rights reserved.
//
// Licensed under the MIT License (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://opensource.org/licenses/MIT
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

#import "DWFullScreenModalControllerViewController.h"

#import "DWUIKit.h"

NS_ASSUME_NONNULL_BEGIN

@interface DWFullScreenModalControllerViewController ()

@property (readonly, nonatomic, strong) UIViewController *contentController;

@end

NS_ASSUME_NONNULL_END

@implementation DWFullScreenModalControllerViewController

- (instancetype)initWithController:(UIViewController *)controller {
self = [super initWithNibName:nil bundle:nil];
if (self) {
_contentController = controller;
}
return self;
}

- (void)viewDidLoad {
[super viewDidLoad];

self.view.backgroundColor = [UIColor dw_secondaryBackgroundColor];

UIView *header = [[UIView alloc] init];
header.translatesAutoresizingMaskIntoConstraints = NO;
[self.view addSubview:header];

UILabel *label = [[UILabel alloc] init];
label.translatesAutoresizingMaskIntoConstraints = NO;
label.textColor = [UIColor dw_darkTitleColor];
label.textAlignment = NSTextAlignmentCenter;
label.font = [UIFont dw_fontForTextStyle:UIFontTextStyleHeadline];
label.text = self.title;
label.adjustsFontForContentSizeCategory = YES;
[header addSubview:label];

UIButton *cancelButton = [UIButton buttonWithType:UIButtonTypeSystem];
cancelButton.translatesAutoresizingMaskIntoConstraints = NO;
[cancelButton setImage:[[UIImage imageNamed:@"payments_nav_cross"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]
forState:UIControlStateNormal];
cancelButton.tintColor = [UIColor dw_darkTitleColor];
[cancelButton addTarget:self action:@selector(cancelButtonAction) forControlEvents:UIControlEventTouchUpInside];
[header addSubview:cancelButton];

UIView *contentView = [[UIView alloc] init];
contentView.translatesAutoresizingMaskIntoConstraints = NO;
[self.view addSubview:contentView];

[NSLayoutConstraint activateConstraints:@[
[header.topAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor],
[header.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor
constant:8],
[self.view.trailingAnchor constraintEqualToAnchor:header.trailingAnchor
constant:8],
[header.heightAnchor constraintEqualToConstant:44],

[contentView.topAnchor constraintEqualToAnchor:header.bottomAnchor],
[contentView.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor],
[self.view.trailingAnchor constraintEqualToAnchor:contentView.trailingAnchor],
[self.view.bottomAnchor constraintEqualToAnchor:contentView.bottomAnchor],

[label.topAnchor constraintEqualToAnchor:header.topAnchor],
[label.leadingAnchor constraintEqualToAnchor:header.leadingAnchor
constant:44],
[header.bottomAnchor constraintEqualToAnchor:label.bottomAnchor],

[cancelButton.topAnchor constraintEqualToAnchor:header.topAnchor],
[cancelButton.leadingAnchor constraintEqualToAnchor:label.trailingAnchor],
[cancelButton.trailingAnchor constraintEqualToAnchor:header.trailingAnchor],
[header.bottomAnchor constraintEqualToAnchor:cancelButton.bottomAnchor],
[cancelButton.widthAnchor constraintEqualToConstant:44],
]];

[self dw_embedChild:self.contentController inContainer:contentView];
}

- (void)cancelButtonAction {
[self.delegate fullScreenModalControllerViewControllerDidCancel:self];
}

@end
39 changes: 39 additions & 0 deletions DashPay/Presentation/Error/DWNetworkErrorViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//
// Created by Andrew Podkovyrin
// Copyright © 2020 Dash Core Group. All rights reserved.
//
// Licensed under the MIT License (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://opensource.org/licenses/MIT
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSUInteger, DWErrorDescriptionType) {
DWErrorDescriptionType_Profile,
DWErrorDescriptionType_AcceptContactRequest,
DWErrorDescriptionType_SendContactRequest,
};

@interface DWNetworkErrorViewController : UIViewController

- (instancetype)initWithType:(DWErrorDescriptionType)type;

- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)initWithNibName:(nullable NSString *)nibNameOrNil bundle:(nullable NSBundle *)nibBundleOrNil NS_UNAVAILABLE;
- (instancetype)initWithCoder:(NSCoder *)coder NS_UNAVAILABLE;

@end

NS_ASSUME_NONNULL_END
107 changes: 107 additions & 0 deletions DashPay/Presentation/Error/DWNetworkErrorViewController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
//
// Created by Andrew Podkovyrin
// Copyright © 2020 Dash Core Group. All rights reserved.
//
// Licensed under the MIT License (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://opensource.org/licenses/MIT
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

#import "DWNetworkErrorViewController.h"

#import "DWModalPopupTransition.h"
#import "DWNetworkUnavailableView.h"
#import "DWUIKit.h"

NS_ASSUME_NONNULL_BEGIN

@interface DWNetworkErrorViewController ()

@property (nonatomic, strong) DWModalPopupTransition *modalTransition;
@property (nonatomic, assign) DWErrorDescriptionType type;

@end

NS_ASSUME_NONNULL_END

@implementation DWNetworkErrorViewController

- (instancetype)initWithType:(DWErrorDescriptionType)type {
self = [super initWithNibName:nil bundle:nil];
if (self) {
_type = type;

_modalTransition = [[DWModalPopupTransition alloc] initWithInteractiveTransitionAllowed:NO];

self.transitioningDelegate = self.modalTransition;
self.modalPresentationStyle = UIModalPresentationCustom;
}
return self;
}

- (void)viewDidLoad {
[super viewDidLoad];

self.view.backgroundColor = [UIColor clearColor];

UIView *contentView = [[UIView alloc] init];
contentView.translatesAutoresizingMaskIntoConstraints = NO;
contentView.backgroundColor = [UIColor dw_backgroundColor];
contentView.layer.cornerRadius = 8.0;
contentView.layer.masksToBounds = YES;
[self.view addSubview:contentView];

DWNetworkUnavailableView *errorView = [[DWNetworkUnavailableView alloc] initWithFrame:CGRectZero];
errorView.translatesAutoresizingMaskIntoConstraints = NO;
switch (self.type) {
case DWErrorDescriptionType_Profile:
errorView.error = NSLocalizedString(@"Unable to fetch contact details", nil);
break;
case DWErrorDescriptionType_AcceptContactRequest:
errorView.error = NSLocalizedString(@"Unable to accept contact request", nil);
break;
case DWErrorDescriptionType_SendContactRequest:
errorView.error = NSLocalizedString(@"Unable to send contact request", nil);
break;
}
[contentView addSubview:errorView];

UIButton *closeButton = [UIButton buttonWithType:UIButtonTypeSystem];
closeButton.translatesAutoresizingMaskIntoConstraints = NO;
[closeButton setTitle:NSLocalizedString(@"Close", nil) forState:UIControlStateNormal];
[closeButton addTarget:self action:@selector(closeButtonAction:) forControlEvents:UIControlEventTouchUpInside];
[contentView addSubview:closeButton];


[NSLayoutConstraint activateConstraints:@[
[contentView.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor],
[contentView.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor],
[contentView.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor],

[errorView.topAnchor constraintEqualToAnchor:contentView.topAnchor
constant:32.0],
[errorView.leadingAnchor constraintEqualToAnchor:contentView.leadingAnchor],
[errorView.trailingAnchor constraintEqualToAnchor:contentView.trailingAnchor],

[closeButton.topAnchor constraintEqualToAnchor:errorView.bottomAnchor
constant:32.0],
[closeButton.centerXAnchor constraintEqualToAnchor:contentView.centerXAnchor],
[contentView.bottomAnchor constraintEqualToAnchor:closeButton.bottomAnchor
constant:16.0],
[closeButton.heightAnchor constraintGreaterThanOrEqualToConstant:44.0],
]];
}

- (void)closeButtonAction:(UIButton *)sender {
[self dismissViewControllerAnimated:YES completion:nil];
}

@end
Loading