Skip to content

Commit 1bcec67

Browse files
feat: marketplace swap sample widget (#3532)
1 parent d072f0c commit 1bcec67

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed
File renamed without changes.
Binary file not shown.

Source/Immutable/Private/Immutable/Marketplace/ImtblSwapRequest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ bool UImtblSwapRequest::GetApiKey(EImtblEnvironment Environment, FString& ApiKey
3737
return false;
3838
}
3939

40-
bool UImtblSwapRequest::ComputePath(EImtblEnvironment Environment, FString FromTokenAddress, FString ToTokenAddress, FString& ComputedPath) const
40+
bool UImtblSwapRequest::ComputePath(FString& ComputedPath, EImtblEnvironment Environment, FString FromTokenAddress, FString ToTokenAddress) const
4141
{
4242
FString BaseUrl;
4343
bool bFoundBaseUrl = GetBaseUrl(Environment, BaseUrl);

Source/Immutable/Public/Immutable/Marketplace/ImtblSwapRequest.h

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ struct FImtblSwapRequestQueryParams
2929
/**
3030
* Functionality to generate swap requests
3131
*/
32-
// UCLASS(BlueprintType, Config = "Immutable", DefaultConfig)
33-
UCLASS(BlueprintType, Config = "Immutable")
32+
UCLASS(BlueprintType, Config = "Immutable", DefaultConfig)
3433
class IMMUTABLE_API UImtblSwapRequest : public UObject
3534
{
3635
GENERATED_BODY()
@@ -39,7 +38,7 @@ class IMMUTABLE_API UImtblSwapRequest : public UObject
3938
/**
4039
* Finds the base url associated with the environment.
4140
*
42-
* @param Environment The environment that will be used to look the value up.
41+
* @param Environment The environment that will be used to look the value up. Only sandbox and production environment are supported.
4342
* @param BaseUrl The base url associated with the key.
4443
* @return True if an item was found (False indicates nothing in the map uses the provided environment).
4544
*/
@@ -49,7 +48,7 @@ class IMMUTABLE_API UImtblSwapRequest : public UObject
4948
/**
5049
* Finds the api key associated with the provided key.
5150
*
52-
* @param Environment The environment that will be used to look the value up.
51+
* @param Environment The environment that will be used to look the value up. Only sandbox and production environment are supported.
5352
* @param ApiKey The api key associated with the key.
5453
* @return True if an item was found (False indicates nothing in the map uses the provided environment).
5554
*/
@@ -59,14 +58,14 @@ class IMMUTABLE_API UImtblSwapRequest : public UObject
5958
/**
6059
* Generates a path link for the swap flow.
6160
*
62-
* @param Environment The environment that will be used to compute the path.
63-
* @param ToTokenAddress The address of the token being swapped from. Also known as the token contract address.
64-
* @param FromTokenAddress The address of the token being swapped to. Also known as the token contract address.
65-
* @param ComputedPath [OUT] The address of the token being swapped to. Also known as the token contract address.
66-
* @return True if path was computed (False indicates path failed to compute).
61+
* @param ComputedPath [Out] The address of the token being swapped to. Also known as the token contract address.
62+
* @param Environment The environment that will be used to compute the path. Only sandbox and production environment are supported.
63+
* @param ToTokenAddress [Optional] The address of the token being swapped from (default value is empty). Also known as the token contract address.
64+
* @param FromTokenAddress [Optional] The address of the token being swapped to (default value is empty). Also known as the token contract address.
65+
* @return True if path was computed (False indicates path failed to compute).
6766
*/
6867
UFUNCTION(BlueprintCallable, BlueprintPure = "False", Category = "Immutable")
69-
bool ComputePath(EImtblEnvironment Environment, FString FromTokenAddress, FString ToTokenAddress, FString& ComputedPath) const;
68+
bool ComputePath(FString& ComputedPath, EImtblEnvironment Environment, FString FromTokenAddress = TEXT(""), FString ToTokenAddress = TEXT("")) const;
7069

7170
public:
7271
UPROPERTY(Config, EditDefaultsOnly, BlueprintReadOnly, Category = "Immutable")

0 commit comments

Comments
 (0)