Skip to content

Commit 0efc83f

Browse files
committed
fix: modified defectively generated code
1 parent 1e08898 commit 0efc83f

File tree

7 files changed

+23
-6
lines changed

7 files changed

+23
-6
lines changed

Source/Experimental/ImmutableOrderbook/Private/APIItemType.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
namespace ImmutableOrderbook
2121
{
22-
22+
// -- DIVERGE
2323
void APIItemType::WriteJson(JsonWriter& Writer) const
2424
{
2525
Writer->WriteValue(Value);
@@ -29,5 +29,5 @@ bool APIItemType::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
2929
{
3030
return JsonValue->TryGetNumber(Value);
3131
}
32-
32+
// -- DIVERGE
3333
}

Source/Experimental/ImmutableOrderbook/Private/APIOrderType.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
namespace ImmutableOrderbook
2121
{
22+
// -- DIVERGE
2223
void APIOrderType::WriteJson(JsonWriter& Writer) const
2324
{
2425
Writer->WriteValue(Value);
@@ -28,4 +29,5 @@ bool APIOrderType::FromJson(const TSharedPtr<FJsonValue>& JsonValue)
2829
{
2930
return JsonValue->TryGetNumber(Value);
3031
}
32+
// -- DIVERGE
3133
}

Source/Experimental/ImmutableOrderbook/Private/APIPrepareListingRequestSell.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,12 @@ inline bool TryGetJsonValue(const TSharedPtr<FJsonValue>& JsonValue, APIPrepareL
7676
void APIPrepareListingRequestSell::WriteJson(JsonWriter& Writer) const
7777
{
7878
Writer->WriteObjectStart();
79-
Writer->WriteIdentifierPrefix(TEXT("amount")); WriteJsonValue(Writer, Amount);
79+
// -- DIVERGE
80+
if (Amount.IsSet())
81+
{
82+
Writer->WriteIdentifierPrefix(TEXT("amount")); WriteJsonValue(Writer, Amount.GetValue());
83+
}
84+
// -- DIVERGE
8085
Writer->WriteIdentifierPrefix(TEXT("contractAddress")); WriteJsonValue(Writer, ContractAddress);
8186
Writer->WriteIdentifierPrefix(TEXT("tokenId")); WriteJsonValue(Writer, TokenId);
8287
Writer->WriteIdentifierPrefix(TEXT("type")); WriteJsonValue(Writer, Type);

Source/Experimental/ImmutableOrderbook/Public/APIItemType.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ class IMMUTABLEORDERBOOK_API APIItemType : public Model
2929
bool FromJson(const TSharedPtr<FJsonValue>& JsonValue) final;
3030
void WriteJson(JsonWriter& Writer) const final;
3131

32+
// -- DIVERGE
3233
uint8 Value;
33-
34+
// -- DIVERGE
3435
};
3536

3637
}

Source/Experimental/ImmutableOrderbook/Public/APIOrderType.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ class IMMUTABLEORDERBOOK_API APIOrderType : public Model
2929
bool FromJson(const TSharedPtr<FJsonValue>& JsonValue) final;
3030
void WriteJson(JsonWriter& Writer) const final;
3131

32+
// -- DIVERGE
3233
uint8 Value;
34+
// -- DIVERGE
3335
};
3436

3537
}

Source/Experimental/ImmutableOrderbook/Public/APIPrepareListingRequestSell.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ class IMMUTABLEORDERBOOK_API APIPrepareListingRequestSell : public Model
3131
bool FromJson(const TSharedPtr<FJsonValue>& JsonValue) final;
3232
void WriteJson(JsonWriter& Writer) const final;
3333

34-
FString Amount;
34+
// -- DIVERGE
35+
TOptional<FString> Amount;
36+
// -- DIVERGE
3537
FString ContractAddress;
3638
FString TokenId;
3739
enum class TypeEnum

Source/Experimental/ImmutablezkEVMAPI/Public/APINFTMetadataAttribute.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ class IMMUTABLEZKEVMAPI_API APINFTMetadataAttribute : public Model
4444
TOptional<DisplayTypeEnum> DisplayType;
4545
/* The metadata trait type */
4646
FString TraitType;
47-
APINFTMetadataAttributeValue Value;
47+
48+
// -- DIVERGE
49+
//APINFTMetadataAttributeValue Value;
50+
// NOTE! Edited to FString but has to be OpenAPINFTMetadataAttributeValue; Currently OpenAPI generates empty OpenAPINFTMetadataAttributeValue structure
51+
FString Value;
52+
// -- DIVERGE
4853
};
4954

5055
}

0 commit comments

Comments
 (0)