Skip to content
Snippets Groups Projects
Commit df68076a authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Andreas Traczyk
Browse files

account: register username


This patch:
- set account details right after name registration ended
to save changes in .yml file.
- remove password field, as now password is not used to register
an account.

Change-Id: Icb69844edb36aefc61c4fe257470a23aa1424c4d
Reviewed-by: default avatarAndreas Traczyk <andreas.traczyk@savoirfairelinux.com>
parent 0c3c6e6a
No related branches found
No related tags found
No related merge requests found
......@@ -258,6 +258,8 @@ typedef NS_ENUM(NSInteger, TagViews) {
buttonRegisterWidthConstraint.constant = 0.0;
[registerNameButton setHidden:YES];
[registeredNameField setStringValue:name];
lrc::api::account::ConfProperties_t accountProperties = self.accountModel->getAccountConfig(self.selectedAccountID);
self.accountModel->setAccountConfig(self.selectedAccountID, accountProperties);
}
#pragma mark - NSTextFieldDelegate delegate methods
......
......@@ -36,16 +36,6 @@
@property (nonatomic, weak) NSViewController <RegisterNameDelegate>* delegate;
/**
* KVO with the registeredNameField
*/
//@property (nonatomic, weak)NSString* registeredName;
/**
* KVO with the passwordField
*/
//@property (nonatomic, weak)NSString* password;
/**
* KVO validators for the UI
*/
......
......@@ -30,7 +30,6 @@
@implementation RegisterNameWC
{
__unsafe_unretained IBOutlet NSTextField* registeredNameField;
__unsafe_unretained IBOutlet NSSecureTextField* passwordField;
__unsafe_unretained IBOutlet NSImageView* ivLookupResult;
__unsafe_unretained IBOutlet NSProgressIndicator* indicatorLookupResult;
......@@ -63,10 +62,6 @@ NSInteger const BLOCKCHAIN_NAME_TAG = 2;
[registeredNameField setTag:BLOCKCHAIN_NAME_TAG];
[ivLookupResult setHidden:YES];
[indicatorLookupResult setHidden:YES];
// self.password = @"";
//self.registeredName = @"";
// [registeredNameField setPlaceholderString:@"Username..."];
// [passwordField setPlaceholderString:@"Password..."];
}
#pragma mark - Username validation delegate methods
......@@ -195,7 +190,7 @@ NSInteger const BLOCKCHAIN_NAME_TAG = 2;
[self showLoading];
[self setCallback];
self.isUserNameAvailable = self.accountModel->registerName(self.selectedAccountID, [passwordField.stringValue UTF8String], [registeredNameField.stringValue UTF8String]);
self.isUserNameAvailable = self.accountModel->registerName(self.selectedAccountID, "", [registeredNameField.stringValue UTF8String]);
if (!self.isUserNameAvailable) {
NSLog(@"Could not initialize registerName operation");
QObject::disconnect(registrationEnded);
......
......@@ -32,5 +32,5 @@
/* Class = "NSButtonCell"; title = "Register"; ObjectID = "lT3-Bh-MnL"; */
"lT3-Bh-MnL.title" = "Register";
/* Class = "NSTextFieldCell"; title = "Register username on the blockchain"; ObjectID = "tje-EZ-ZPI"; */
"tje-EZ-ZPI.title" = "Register username on the blockchain";
/* Class = "NSTextFieldCell"; title = "Register a public username"; ObjectID = "tje-EZ-ZPI"; */
"tje-EZ-ZPI.title" = "Register a public username";
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment