Skip to content

Commit

Permalink
Merge pull request #540 from Syn-McJ/fix/confirm-request-crash
Browse files Browse the repository at this point in the history
fix: nil address check
  • Loading branch information
Syn-McJ authored Apr 25, 2024
2 parents 40c1834 + ddebd24 commit 49b6db2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,8 @@ - (void)confirmProtocolRequest:(DSPaymentProtocolRequest *)protoReq forAmount:(u
isSecure:isSecure
errorMessage:@""
localCurrency:localCurrency];
if (transactionCreationCompletion(tx, suggestedPrompt, amount, fee, @[address], isSecure)) {

if (transactionCreationCompletion(tx, suggestedPrompt, amount, fee, address ? @[address] : @[], isSecure)) {
CFRunLoopPerformBlock([[NSRunLoop mainRunLoop] getCFRunLoop], kCFRunLoopCommonModes, ^{
[self signAndPublishTransaction:tx createdFromProtocolRequest:protoReq fromAccount:account toAddress:address requiresSpendingAuthenticationPrompt:YES promptMessage:suggestedPrompt forAmount:amount keepAuthenticatedIfErrorAfterAuthentication:keepAuthenticatedIfErrorAfterAuthentication requestingAdditionalInfo:additionalInfoRequest presentChallenge:challenge transactionCreationCompletion:transactionCreationCompletion signedCompletion:signedCompletion publishedCompletion:publishedCompletion requestRelayCompletion:requestRelayCompletion errorNotificationBlock:errorNotificationBlock];
});
Expand Down

0 comments on commit 49b6db2

Please sign in to comment.