diff --git a/Metaverse/Source/Metaverse/Private/Components/DefiWalletCoreComponent.cpp b/Metaverse/Source/Metaverse/Private/Components/DefiWalletCoreComponent.cpp index 2bd9ca0..107ca75 100644 --- a/Metaverse/Source/Metaverse/Private/Components/DefiWalletCoreComponent.cpp +++ b/Metaverse/Source/Metaverse/Private/Components/DefiWalletCoreComponent.cpp @@ -38,6 +38,6 @@ void UDefiWalletCoreComponent::Setup() { *NewDefiWalletCore->GetActorNameOrLabel()); _DefiWalletCore = NewDefiWalletCore; return; - } + } _DefiWalletCore = DefiWalletCore; -} +} \ No newline at end of file diff --git a/Metaverse/Source/Metaverse/Private/Components/WalletConnectTriggerComponent.cpp b/Metaverse/Source/Metaverse/Private/Components/WalletConnectTriggerComponent.cpp index 453cb9a..a2f065b 100644 --- a/Metaverse/Source/Metaverse/Private/Components/WalletConnectTriggerComponent.cpp +++ b/Metaverse/Source/Metaverse/Private/Components/WalletConnectTriggerComponent.cpp @@ -35,7 +35,7 @@ APlayCppSdkActor *UWalletConnectTriggerComponent::Setup() { std::string userwalletnamespace = "{\"eip155\":{\"methods\":[\"eth_sendTransaction\",\"eth_" "signTransaction\",\"eth_sign\",\"personal_sign\",\"eth_" - "signTypedData\"],\"chains\":[\"eip155:5\"],\"events\":[" + "signTypedData\"],\"chains\":[\"eip155:338\"],\"events\":[" "\"chainChanged\",\"accountsChanged\"]}}"; std::string userclientmeta= "{\"description\":\"Defi WalletConnect v2 " diff --git a/Metaverse/Source/Metaverse/Private/NPC/SendEthTransaction.cpp b/Metaverse/Source/Metaverse/Private/NPC/SendEthTransaction.cpp index 6eb86be..90b367e 100644 --- a/Metaverse/Source/Metaverse/Private/NPC/SendEthTransaction.cpp +++ b/Metaverse/Source/Metaverse/Private/NPC/SendEthTransaction.cpp @@ -29,15 +29,16 @@ void ASendEthTransaction::OnSendEthTransactionBeginOverlap( UWalletConnectTriggerComponent *WalletConnectTriggerComponent = GetWalletConnectTriggerComponent(); - + WalletConnectTriggerComponent->OnWalletconnectSendEip155TransactionDelegate .BindDynamic( this, &ASendEthTransaction::OnWalletconnectSendEip155TransactionFinished); FWalletConnectTxEip155 tx; - tx.to = FString("0xA914161b1b8d9dbC9c5310Fc7EBee5A5B18044b7"); - tx.value = FString("1000000000000000000"); + tx.from = FString(std::getenv("MY_FROM_ADDRESS")); + tx.to = FString(std::getenv("MY_TO_ADDRESS")); + tx.value = FString("10000"); // wei WalletConnectTriggerComponent->SendEip155Transaction(tx); WalletConnectTriggerComponent->OnShowQR.BindDynamic(this, &Super::ShowQR);