Skip to content

Commit

Permalink
chore: removed redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
YermekG committed Dec 18, 2024
1 parent f9c6008 commit 39d3b22
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions Source/Immutable/Private/Immutable/Transak/TransakWebBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,11 @@ void UTransakWebBrowser::Load(const FString& WalletAddress, const FString& Email
}

FString UrlToLoad = ComputePath(WalletAddress, Email, ProductsAvailed, ScreenTitle);

if (bIsReady)
FDelegateHandle OnWhenReadyHandle = CallAndRegister_OnWhenReady(UTransakWebBrowser::FOnWhenReady::FDelegate::CreateWeakLambda(this, [this, UrlToLoad, OnWhenReadyHandle]()
{
#if (ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 1)
WebBrowserWidget->LoadURL(UrlToLoad);
#endif
}
else
{
FDelegateHandle OnWhenReadyHandle = CallAndRegister_OnWhenReady(UTransakWebBrowser::FOnWhenReady::FDelegate::CreateWeakLambda(this, [this, UrlToLoad, OnWhenReadyHandle]()
{
#if (ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 1)
WebBrowserWidget->LoadURL(UrlToLoad);
#else
WebBrowserWidget->LoadURL(UrlToLoad);
#endif
OnWhenReady.Remove(OnWhenReadyHandle);
}));
}
OnWhenReady.Remove(OnWhenReadyHandle);
}));
}

FDelegateHandle UTransakWebBrowser::CallAndRegister_OnWhenReady(FOnWhenReady::FDelegate Delegate)
Expand Down

0 comments on commit 39d3b22

Please sign in to comment.