Skip to content

Commit 9c0dbce

Browse files
committed
overload methods to set chain in SequenceIndexerBP
1 parent 94f97af commit 9c0dbce

4 files changed

Lines changed: 22 additions & 6 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:5f81f20eaf89dfd1046a110a682995c9ac89b4fc6a62d41a9695bb2245f92782
3-
size 332036
2+
oid sha256:7ca972fc545d28337cdb028f2bfcabdaaf309742ab5c5d1aeb11af3134e70226
3+
size 335108

Plugins/SequencePlugin/Source/SequencePlugin/Private/Integrators/SequenceIndexerBP.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,19 @@ USequenceIndexerBP::USequenceIndexerBP()
1111
this->Indexer = NewObject<UIndexer>();
1212
}
1313

14-
void USequenceIndexerBP::SetChain(const FString& ChainName)
14+
void USequenceIndexerBP::SetChainById(const int64 NewChainId)
1515
{
16-
ChainId = USequenceSupport::GetNetworkId(ChainName);
16+
ChainId = NewChainId;
17+
}
18+
19+
void USequenceIndexerBP::SetChainByName(const FString& NewChainName)
20+
{
21+
ChainId = USequenceSupport::GetNetworkId(NewChainName);
22+
}
23+
24+
void USequenceIndexerBP::SetChainByType(const ENetwork& NewChainType)
25+
{
26+
ChainId = USequenceSupport::GetNetworkId(NewChainType);
1727
}
1828

1929
void USequenceIndexerBP::GetEtherBalanceAsync(const FString& WalletAddress)

Plugins/SequencePlugin/Source/SequencePlugin/Private/Util/SequenceSupport.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ int64 USequenceSupport::GetNetworkId(const FString& NetworkNameIn)
5858

5959
int64 USequenceSupport::GetNetworkId(const ENetwork& Network)
6060
{
61-
if (NetworkIdToNameMap.Contains(Network))
61+
if (NetworkEnumToIdMap.Contains(Network))
6262
{
6363
return *NetworkEnumToIdMap.Find(Network);
6464
}

Plugins/SequencePlugin/Source/SequencePlugin/Public/Integrators/SequenceIndexerBP.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,13 @@ class SEQUENCEPLUGIN_API USequenceIndexerBP : public UGameInstanceSubsystem
3838
FOnGetTransactionHistory TransactionHistoryReceived;
3939

4040
UFUNCTION(BlueprintCallable, Category="0xSequence SDK - Functions")
41-
void SetChain(const FString& ChainName);
41+
void SetChainById(const int64 NewChainId);
42+
43+
UFUNCTION(BlueprintCallable, Category="0xSequence SDK - Functions")
44+
void SetChainByName(const FString& NewChainName);
45+
46+
UFUNCTION(BlueprintCallable, Category="0xSequence SDK - Functions")
47+
void SetChainByType(const ENetwork& NewChainType);
4248

4349
UFUNCTION(BlueprintCallable, Category="0xSequence SDK - Functions")
4450
void GetEtherBalanceAsync(const FString& WalletAddress);

0 commit comments

Comments
 (0)