-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: added transak widget #158
base: main
Are you sure you want to change the base?
Conversation
* feat: added transak web widget and environment enum * fix: resolved compile issue with ue4 * fix: compiler issue with ue4 * chore: isolated source code for ue5 * feat: add blu web browser to transak widget (#3498) * refactor: apply formatting * refactor: move include inside respective engine macro * refactor: expose is ready to blueprint * refactor: change private to protected * refactor: reorder .h and .cpp functions to match each other * chore: update loctext namespace * fix: compile error * chore: removed redundant code * chore: removed prefixes --------- Co-authored-by: Yermek Garifullanov <yermek.garifullanov@immutable.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Unity, I put all commerce related stuff in another package. i.e. Marketplace. Should Transak stuff be in another folder e.g. Source/ImmutableMarketplace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can rename Transak folder to Marketplace to support your logic. However, I dont really thing we need to prefix it with Immutable. Will you accept it?
* @param ScreenTitle The title of the screen to load. | ||
*/ | ||
UFUNCTION(BlueprintCallable) | ||
void Load(const FString& WalletAddress, const FString& Email, const FString& ProductsAvailed, const FString& ScreenTitle); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For blueprintcallables, I would prefer if the parameters arent const &
as you can just enter text to the blueprint node when you call it
* @details More details could be found under the class parameter | ||
* @return ThemeColor as FLinearColor | ||
*/ | ||
const FLinearColor& GetThemeColor() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const FLinearColor& GetThemeColor() const
?
* @details More details could be found under the class parameter | ||
* @return CryptoCurrencyList as array of FString | ||
*/ | ||
const TArray<FString>& GetCryptoCurrencyList() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const TArray<FString>& GetCryptoCurrencyList() const
?
* @details More details could be found under the class parameter | ||
* @return bDisableWalletAddressForm as bool | ||
*/ | ||
bool DisableWalletAddressForm() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bool DisableWalletAddressForm() const
?
* @details More details could be found under the class parameter | ||
* @return bIsAutoFillUserData as bool | ||
*/ | ||
bool IsAutoFillUserData() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bool IsAutoFillUserData() const
?
UFUNCTION(BlueprintCallable) | ||
void Load(const FString& WalletAddress, const FString& Email, const FString& ProductsAvailed, const FString& ScreenTitle); | ||
|
||
FDelegateHandle CallAndRegister_OnWhenReady(FOnWhenReady::FDelegate Delegate); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to create this Ready wrapper, when all it does is listen to when url changes. The ready name is kinda misleading. We can't compare the URL's to see if its "ready" ?
If we actually keep it, wouldn't it be better if .Clear()
ready delegate after .Broadcast()
so that subscribers don't need to manually invoke .Remove
#pragma once | ||
|
||
UENUM() | ||
enum class EPassportEnvironment : uint8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expose to blueprints ?
|
||
|
||
UENUM() | ||
enum class ETransakEnvironment : uint8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expose to blueprints ?
|
||
if (!TransakConfig) | ||
{ | ||
return ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap with TEXT
* @brief Configuration settings for Transak widget. | ||
*/ | ||
UCLASS(Abstract, Blueprintable, ClassGroup = Immutable) | ||
class UTransakConfig : public UObject |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expose the getters with blueprint pure ?
{ | ||
return false; | ||
} | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add #undef LOCTEXT_NAMESPACE
at end of file
* @details More details could be found under the class parameter | ||
* @return bDisableWalletAddressForm as bool | ||
*/ | ||
bool DisableWalletAddressForm() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be consistent and not be misleading, perhaps change it to IsDisableWalletAddressForm
Summary
Added transak widget which allows players add funds to purchase in-game nfts
feat:
,fix:
,chore:
,docs:
,refactor:
ortest:
.