Skip to content

Commit e87cd66

Browse files
committed
chore: removed redundant code
1 parent 6383053 commit e87cd66

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

Source/Immutable/Private/Immutable/Transak/TransakWebBrowser.cpp

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,11 @@ void UTransakWebBrowser::Load(const FString& WalletAddress, const FString& Email
2828
}
2929

3030
FString UrlToLoad = ComputePath(WalletAddress, Email, ProductsAvailed, ScreenTitle);
31-
32-
if (bIsReady)
31+
FDelegateHandle OnWhenReadyHandle = CallAndRegister_OnWhenReady(UTransakWebBrowser::FOnWhenReady::FDelegate::CreateWeakLambda(this, [this, UrlToLoad, OnWhenReadyHandle]()
3332
{
34-
#if (ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 1)
3533
WebBrowserWidget->LoadURL(UrlToLoad);
36-
#endif
37-
}
38-
else
39-
{
40-
FDelegateHandle OnWhenReadyHandle = CallAndRegister_OnWhenReady(UTransakWebBrowser::FOnWhenReady::FDelegate::CreateWeakLambda(this, [this, UrlToLoad, OnWhenReadyHandle]()
41-
{
42-
#if (ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 1)
43-
WebBrowserWidget->LoadURL(UrlToLoad);
44-
#else
45-
WebBrowserWidget->LoadURL(UrlToLoad);
46-
#endif
47-
OnWhenReady.Remove(OnWhenReadyHandle);
48-
}));
49-
}
34+
OnWhenReady.Remove(OnWhenReadyHandle);
35+
}));
5036
}
5137

5238
FDelegateHandle UTransakWebBrowser::CallAndRegister_OnWhenReady(FOnWhenReady::FDelegate Delegate)

0 commit comments

Comments
 (0)