Skip to content

Commit

Permalink
fix: adapt changed identity methods for example app
Browse files Browse the repository at this point in the history
  • Loading branch information
pankcuf committed Nov 8, 2023
1 parent 0ea895a commit 634011f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 40 deletions.
38 changes: 18 additions & 20 deletions Example/DashSync/DSCreateBlockchainIdentityViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -154,26 +154,24 @@ - (IBAction)done:(id)sender {
}
[blockchainIdentity generateBlockchainIdentityExtendedPublicKeysWithPrompt:@"Update wallet to allow for Evolution features?"
completion:^(BOOL registered) {
[blockchainIdentity createFundingPrivateKeyWithPrompt:@"Register?"
completion:^(BOOL success, BOOL cancelled) {
if (success && !cancelled) {
[blockchainIdentity registerOnNetwork:steps
withFundingAccount:self.fundingAccount
forTopupAmount:topupAmount
stepCompletion:^(DSBlockchainIdentityRegistrationStep stepCompleted) {

}
completion:^(DSBlockchainIdentityRegistrationStep stepsCompleted, NSError *_Nonnull error) {
if (error) {
[self raiseIssue:@"Error" message:error.localizedDescription];
return;
} else {
[self.presentingViewController dismissViewControllerAnimated:TRUE completion:nil];
}
}];
}
}];
}];
[blockchainIdentity createFundingPrivateKeyWithPrompt:@"Register?" completion:^(BOOL success, BOOL cancelled) {
if (success && !cancelled) {
[blockchainIdentity registerOnNetwork:steps
withFundingAccount:self.fundingAccount
forTopupAmount:topupAmount
pinPrompt:@"Enter your PIN?"
stepCompletion:^(DSBlockchainIdentityRegistrationStep stepCompleted) {}
completion:^(DSBlockchainIdentityRegistrationStep stepsCompleted, NSError *_Nonnull error) {
if (error) {
[self raiseIssue:@"Error" message:error.localizedDescription];
return;
} else {
[self.presentingViewController dismissViewControllerAnimated:TRUE completion:nil];
}
}];
}
}];
}];
}

- (void)viewController:(UIViewController *)controller didChooseWallet:(DSWallet *)wallet {
Expand Down
38 changes: 18 additions & 20 deletions Example/DashSync/DSCreateInvitationViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -123,26 +123,24 @@ - (IBAction)done:(id)sender {
DSBlockchainIdentityRegistrationStep steps = DSBlockchainIdentityRegistrationStep_L1Steps;
[blockchainInvitation generateBlockchainInvitationsExtendedPublicKeysWithPrompt:@"Update wallet to allow for Evolution features?"
completion:^(BOOL registered) {
[blockchainInvitation.identity createFundingPrivateKeyForInvitationWithPrompt:@"Register?"
completion:^(BOOL success, BOOL cancelled) {
if (success && !cancelled) {
[blockchainInvitation.identity registerOnNetwork:steps
withFundingAccount:self.fundingAccount
forTopupAmount:topupAmount
stepCompletion:^(DSBlockchainIdentityRegistrationStep stepCompleted) {

}
completion:^(DSBlockchainIdentityRegistrationStep stepsCompleted, NSError *_Nonnull error) {
if (error) {
[self raiseIssue:@"Error" message:error.localizedDescription];
return;
} else {
[self.presentingViewController dismissViewControllerAnimated:TRUE completion:nil];
}
}];
}
}];
}];
[blockchainInvitation.identity createFundingPrivateKeyForInvitationWithPrompt:@"Register?" completion:^(BOOL success, BOOL cancelled) {
if (success && !cancelled) {
[blockchainInvitation.identity registerOnNetwork:steps
withFundingAccount:self.fundingAccount
forTopupAmount:topupAmount
pinPrompt:@"Enter your PIN?"
stepCompletion:^(DSBlockchainIdentityRegistrationStep stepCompleted) {}
completion:^(DSBlockchainIdentityRegistrationStep stepsCompleted, NSError *_Nonnull error) {
if (error) {
[self raiseIssue:@"Error" message:error.localizedDescription];
return;
} else {
[self.presentingViewController dismissViewControllerAnimated:TRUE completion:nil];
}
}];
}
}];
}];
}

- (void)viewController:(UIViewController *)controller didChooseWallet:(DSWallet *)wallet {
Expand Down

0 comments on commit 634011f

Please sign in to comment.