Skip to content

Commit

Permalink
feat: added signtypeddata method that accepts json string
Browse files Browse the repository at this point in the history
  • Loading branch information
YermekG committed Oct 22, 2024
1 parent 31b8996 commit bf738b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Source/Immutable/Private/Immutable/ImmutablePassport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion Source/Immutable/Public/Immutable/ImmutablePassport.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit bf738b1

Please sign in to comment.