Skip to content

Commit

Permalink
[DX-2604] fix: added error output message parameter for RegisterOffCh…
Browse files Browse the repository at this point in the history
…ain (#66)

* fix: added error output message parameter for register off chain node

* chore: updated sample blueprints
  • Loading branch information
YermekG authored Feb 6, 2024
1 parent 089ff3b commit 164135c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void UImtblPassportImxRegisterOffchainAsyncAction::Activate()
{
FString Err = "RegisterOffchain failed due to missing world or world context object.";
IMTBL_WARN("%s", *Err)
OnFailure.Broadcast(Err);
OnFailure.Broadcast(TEXT(""), Err);
return;
}

Expand All @@ -44,11 +44,11 @@ void UImtblPassportImxRegisterOffchainAsyncAction::OnImxRegisterOffchainResponse
{
if (auto ResponseData = JsonObjectToUStruct<FImxRegisterOffchainResponse>(Result.Response.JsonObject))
{
OnSuccess.Broadcast(ResponseData->tx_hash);
OnSuccess.Broadcast(ResponseData->tx_hash, TEXT(""));
return;
}
}

OnFailure.Broadcast(Result.Message);
OnFailure.Broadcast(TEXT(""), Result.Message);
}

Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ class IMMUTABLE_API UImtblPassportImxRegisterOffchainAsyncAction : public UImtbl
{
GENERATED_BODY()

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnSuccessOutputPin, FString, TxHash);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnFailureOutputPin, FString, ErrorMessage);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOutputPin, FString, TxHash, FString, ErrorMessage);

public:

Expand All @@ -28,8 +27,8 @@ class IMMUTABLE_API UImtblPassportImxRegisterOffchainAsyncAction : public UImtbl
void OnImxRegisterOffchainResponse(struct FImmutablePassportResult Result);

UPROPERTY(BlueprintAssignable)
FOnSuccessOutputPin OnSuccess;
FOutputPin OnSuccess;
UPROPERTY(BlueprintAssignable)
FOnFailureOutputPin OnFailure;
FOutputPin OnFailure;

};

0 comments on commit 164135c

Please sign in to comment.