Skip to content

Commit

Permalink
Merge pull request #517 from dashpay/release/core-20-testnet
Browse files Browse the repository at this point in the history
chore: adapt changed identity methods for example app
  • Loading branch information
pankcuf authored Nov 8, 2023
2 parents 0ea895a + 634011f commit 0c55f85
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 0c55f85

Please sign in to comment.