From bf738b10ff4402883a6c1480ef7ed9d42d5481e1 Mon Sep 17 00:00:00 2001 From: YermekG Date: Wed, 23 Oct 2024 11:31:44 +1300 Subject: [PATCH] feat: added signtypeddata method that accepts json string --- Source/Immutable/Private/Immutable/ImmutablePassport.cpp | 5 +++++ Source/Immutable/Public/Immutable/ImmutablePassport.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Immutable/Private/Immutable/ImmutablePassport.cpp b/Source/Immutable/Private/Immutable/ImmutablePassport.cpp index 6d38ccc..1af9a41 100644 --- a/Source/Immutable/Private/Immutable/ImmutablePassport.cpp +++ b/Source/Immutable/Private/Immutable/ImmutablePassport.cpp @@ -190,6 +190,11 @@ void UImmutablePassport::ZkEvmSignTypedDataV4(const FZkEvmSignTypedDataV4Request CallJS(ImmutablePassportAction::ZkEvmSignTypedDataV4, JsonString, ResponseDelegate, FImtblJSResponseDelegate::CreateUObject(this, &UImmutablePassport::OnBridgeCallbackResponse)); } +void UImmutablePassport::ZkEvmSignTypedDataV4(const FString& JsonString, const FImtblPassportResponseDelegate& ResponseDelegate) +{ + CallJS(ImmutablePassportAction::ZkEvmSignTypedDataV4, JsonString, ResponseDelegate, FImtblJSResponseDelegate::CreateUObject(this, &UImmutablePassport::OnBridgeCallbackResponse)); +} + void UImmutablePassport::ConfirmCode(const FString& DeviceCode, const float Interval, const FImtblPassportResponseDelegate& ResponseDelegate) { FImmutablePassportCodeConfirmRequestData Data{DeviceCode, Interval}; diff --git a/Source/Immutable/Public/Immutable/ImmutablePassport.h b/Source/Immutable/Public/Immutable/ImmutablePassport.h index 26ba04b..31a3a62 100644 --- a/Source/Immutable/Public/Immutable/ImmutablePassport.h +++ b/Source/Immutable/Public/Immutable/ImmutablePassport.h @@ -4,7 +4,6 @@ #include "CoreMinimal.h" #include "JsonObjectConverter.h" -#include "Misc/EngineVersion.h" #include "Runtime/Core/Public/HAL/Platform.h" #include "UObject/Object.h" #include "Immutable/ImtblJSConnector.h" @@ -122,6 +121,7 @@ class IMMUTABLE_API UImmutablePassport : public UObject * @param ResponseDelegate The response delegate of type FImtblPassportResponseDelegate to call on response from JS. */ void ZkEvmSignTypedDataV4(const FZkEvmSignTypedDataV4Request& Request, const FImtblPassportResponseDelegate& ResponseDelegate); + void ZkEvmSignTypedDataV4(const FString& JsonString, const FImtblPassportResponseDelegate& ResponseDelegate); void GetIdToken(const FImtblPassportResponseDelegate& ResponseDelegate); void GetAccessToken(const FImtblPassportResponseDelegate& ResponseDelegate);