Skip to content

Commit

Permalink
v1.8.1 (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
dirtycajunrice authored Dec 5, 2024
1 parent 83fe3b6 commit e552b98
Show file tree
Hide file tree
Showing 44 changed files with 422 additions and 241 deletions.
Binary file modified Content/Defaults/WBP_Thirdweb_OAuthOverlay.uasset
Binary file not shown.
Binary file modified Content/Examples/NodeDocs/Thirdweb_AllNodes.uasset
Binary file not shown.
Binary file modified Content/Examples/Widgets/BP_Thirdweb_OTPVerifyModal.uasset
Binary file not shown.
Binary file modified Content/Examples/Widgets/WBP_Thirdweb_Guest.uasset
Binary file not shown.
Binary file modified Content/Examples/Widgets/WBP_Thirdweb_InApp.uasset
Binary file not shown.
Binary file modified Content/Examples/Widgets/WBP_Thirdweb_Smart.uasset
Binary file not shown.
41 changes: 0 additions & 41 deletions Makefile

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) 2024 Thirdweb. All Rights Reserved.

#include "AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateAuthEndpointWallet.h"

#include "Wallets/ThirdwebInAppWalletHandle.h"

void UAsyncTaskThirdwebCreateAuthEndpointWallet::Activate()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) 2024 Thirdweb. All Rights Reserved.

#include "AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateEmailWallet.h"

#include "Wallets/ThirdwebInAppWalletHandle.h"

void UAsyncTaskThirdwebCreateEmailWallet::Activate()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) 2024 Thirdweb. All Rights Reserved.

#include "AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateGuestWallet.h"

#include "Wallets/ThirdwebInAppWalletHandle.h"

void UAsyncTaskThirdwebCreateGuestWallet::Activate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,8 @@
#include "AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateOAuthWallet.h"

#include "ThirdwebRuntimeSettings.h"

#include "Wallets/ThirdwebInAppWalletHandle.h"

UAsyncTaskThirdwebCreateOAuthWallet* UAsyncTaskThirdwebCreateOAuthWallet::CreateOAuthWallet(UObject* WorldContextObject, const EThirdwebOAuthProvider Provider)
{
if (!WorldContextObject)
{
return nullptr;
}
ThisClass* Task = NewObject<ThisClass>(WorldContextObject);
Task->Provider = Provider;
Task->RegisterWithGameInstance(WorldContextObject);
return Task;
}

void UAsyncTaskThirdwebCreateOAuthWallet::Activate()
{
FInAppWalletHandle::CreateOAuthWallet(Provider,BIND_CREATE_WALLET_SUCCESS_DELEGATE, BIND_CREATE_WALLET_ERROR_DELEGATE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,8 @@
#include "AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateSmartWallet.h"

#include "Components/SlateWrapperTypes.h"

#include "Wallets/ThirdwebSmartWalletHandle.h"

UAsyncTaskThirdwebCreateSmartWallet* UAsyncTaskThirdwebCreateSmartWallet::CreateSmartWallet(UObject* WorldContextObject,
const FInAppWalletHandle& InAppWallet,
const int64 ChainID,
const bool bGasless,
const FString& Factory,
const FString& AccountOverride)
{
if (!WorldContextObject)
{
return nullptr;
}
NEW_TASK

Task->InAppWallet = InAppWallet;
Task->ChainID = ChainID;
Task->bGasless = bGasless;
Task->Factory = Factory;
Task->AccountOverride = AccountOverride;

Task->RegisterWithGameInstance(WorldContextObject);
return Task;
}

void UAsyncTaskThirdwebCreateSmartWallet::Activate()
{
FSmartWalletHandle::Create(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#include "Engine/BackendWallet/ThirdwebBackendWallet.h"

#include "Dom/JsonObject.h"

FThirdwebBackendWallet FThirdwebBackendWallet::FromJson(const TSharedPtr<FJsonObject>& JsonObject)
{
FThirdwebBackendWallet Wallet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "Engine/Marketplace/DirectListings/ThirdwebMarketplaceDirectListing.h"

#include "Dom/JsonObject.h"
#include "Engine/Marketplace/ThirdwebMarketplaceCommon.h"

FThirdwebMarketplaceDirectListing FThirdwebMarketplaceDirectListing::FromJson(const TSharedPtr<FJsonObject>& JsonObject)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "Engine/Marketplace/DirectListings/ThirdwebMarketplaceDirectListingRequest.h"

#include "Dom/JsonObject.h"
#include "Engine/Marketplace/ThirdwebMarketplaceCommon.h"

TSharedPtr<FJsonObject> FThirdwebMarketplaceCreateDirectListingRequest::ToJson() const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#include "Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceBid.h"

#include "Dom/JsonObject.h"

FThirdwebMarketplaceBid FThirdwebMarketplaceBid::FromJson(const TSharedPtr<FJsonObject>& JsonObject)
{
FThirdwebMarketplaceBid Bid;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#include "Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceCreateEnglishAuctionRequest.h"

#include "Dom/JsonObject.h"

TSharedPtr<FJsonObject> FThirdwebMarketplaceCreateEnglishAuctionRequest::ToJson() const
{
TSharedPtr<FJsonObject> JsonObject = MakeShareable(new FJsonObject);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

#include "Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceEnglishAuction.h"

#include "Dom/JsonObject.h"
#include "Engine/Marketplace/ThirdwebMarketplaceCommon.h"


FThirdwebMarketplaceEnglishAuction FThirdwebMarketplaceEnglishAuction::FromJson(const TSharedPtr<FJsonObject>& JsonObject)
{
FThirdwebMarketplaceEnglishAuction Auction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#include "Engine/Marketplace/Offers/ThirdwebMarketplaceMakeOfferRequest.h"

#include "Dom/JsonObject.h"

TSharedPtr<FJsonObject> FThirdwebMarketplaceMakeOfferRequest::ToJson() const
{
TSharedPtr<FJsonObject> JsonObject = MakeShareable(new FJsonObject);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "Engine/Marketplace/Offers/ThirdwebMarketplaceOffer.h"

#include "Dom/JsonObject.h"
#include "Engine/Marketplace/ThirdwebMarketplaceCommon.h"
#include "Misc/DateTime.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

#include "Engine/Marketplace/ThirdwebMarketplaceInternalEntryBase.h"

#include "Dom/JsonObject.h"
#include "Engine/Marketplace/ThirdwebMarketplaceCommon.h"


void FThirdwebMarketplaceInternalEntryBase::Load(const FThirdwebMarketplaceInternalEntryBase& Base)
{
AssetContractAddress = Base.AssetContractAddress;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "Engine/Transaction/ThirdwebEngineTransactionStatusResult.h"

#include "ThirdwebUtils.h"
#include "Dom/JsonObject.h"
#include "Engine/ThirdwebEngineCommon.h"

FThirdwebEngineTransactionStatusResult::FThirdwebEngineTransactionStatusResult()
Expand Down
5 changes: 5 additions & 0 deletions Source/Thirdweb/Private/Wallets/ThirdwebInAppWalletHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,11 @@ void FInAppWalletHandle::SignInWithOAuth(const FString& AuthResult, const FStrea
CHECK_VALIDITY(ErrorDelegate)
CHECK_SOURCE(OAuthProvider, ErrorDelegate)

if (AuthResult.IsEmpty())
{
ErrorDelegate.Execute(TEXT("Empty Auth Result"));
return;
}
FString Result = ThirdwebUtils::ParseAuthResult(AuthResult);
FInAppWalletHandle ThisCopy = *this;
UE::Tasks::Launch(UE_SOURCE_LOCATION, [ThisCopy, Result, SuccessDelegate, ErrorDelegate]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ class THIRDWEB_API UAsyncTaskThirdwebCreateOAuthWallet : public UAsyncTaskThirdw

public:
UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly="true", WorldContext="WorldContextObject"), Category="Thirdweb|Wallets|InApp")
static UAsyncTaskThirdwebCreateOAuthWallet* CreateOAuthWallet(UObject* WorldContextObject, const EThirdwebOAuthProvider Provider);
static UAsyncTaskThirdwebCreateOAuthWallet* CreateOAuthWallet(UObject* WorldContextObject, const EThirdwebOAuthProvider Provider)
{
NEW_TASK
Task->Provider = Provider;
RR_TASK
}

protected:
UPROPERTY(Transient)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,23 @@ class THIRDWEB_API UAsyncTaskThirdwebCreateSmartWallet : public UAsyncTaskThirdw
virtual void Activate() override;

UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly="true", WorldContext="WorldContextObject", AdvancedDisplay="Factory,AccountOverride"), Category="Thirdweb|Wallets|Smart")
static UAsyncTaskThirdwebCreateSmartWallet* CreateSmartWallet(UObject* WorldContextObject,
const FInAppWalletHandle& InAppWallet,
const int64 ChainID,
const bool bGasless = true,
const FString& Factory = "",
const FString& AccountOverride = "");
static UAsyncTaskThirdwebCreateSmartWallet* CreateSmartWallet(
UObject* WorldContextObject,
const FInAppWalletHandle& InAppWallet,
const int64 ChainID,
const bool bGasless = true,
const FString& Factory = "",
const FString& AccountOverride = ""
)
{
NEW_TASK
Task->InAppWallet = InAppWallet;
Task->ChainID = ChainID;
Task->bGasless = bGasless;
Task->Factory = Factory;
Task->AccountOverride = AccountOverride;
RR_TASK
};

DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FCreateSmartWalletDelegate, const FSmartWalletHandle&, SmartWallet, const FString&, Error);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "AsyncTaskThirdwebSmartSignMessage.generated.h"


UCLASS()
UCLASS(Abstract)
class THIRDWEB_API UAsyncTaskThirdwebSmartSignMessage : public UAsyncTaskThirdwebSmartBase
{
GENERATED_BODY()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ UEdGraphPin* UK2Node_ThirdwebBaseAsyncTask::SetPinVisibility(UEdGraphPin* Pin, c
if (Pin)
{
Pin->bHidden = !bShow;
if (!bShow && Pin->LinkedTo.Num() > 0)
{
Pin->BreakAllPinLinks();
}
}
return Pin;
}
Expand Down Expand Up @@ -168,6 +172,15 @@ void UK2Node_ThirdwebBaseAsyncTask::SetNodeHasAdvanced(const bool bHasAdvanced)
}
}

UEdGraphPin* UK2Node_ThirdwebBaseAsyncTask::BreakPinLinksIf(UEdGraphPin* Pin, const bool bBreak)
{
if (bBreak && Pin && Pin->LinkedTo.Num() > 0)
{
Pin->BreakAllPinLinks();
}
return Pin;
}

UEdGraphPin* UK2Node_ThirdwebBaseAsyncTask::GetProviderPin() const
{
UEdGraphPin* Pin = FindPin(TwPins::Provider);
Expand All @@ -189,6 +202,13 @@ UEdGraphPin* UK2Node_ThirdwebBaseAsyncTask::GetWalletPin() const
return Pin;
}

UEdGraphPin* UK2Node_ThirdwebBaseAsyncTask::GetSignaturePin() const
{
UEdGraphPin* Pin = FindPin(TwPins::Signature);
check(Pin == NULL || Pin->Direction == EGPD_Input);
return Pin;
}

UEdGraphPin* UK2Node_ThirdwebBaseAsyncTask::GetInAppWalletPin() const
{
UEdGraphPin* Pin = FindPin(TwPins::InAppWallet);
Expand Down
Loading

0 comments on commit e552b98

Please sign in to comment.