Skip to content

Commit

Permalink
reverted some logs
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Rojo <miguelangel.rojofernandez@mastercard.com>
  • Loading branch information
freemanzMrojo committed Aug 19, 2022
1 parent d6625e7 commit ecde451
Showing 1 changed file with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.tuweni.bytes.Bytes;
import org.web3j.abi.FunctionEncoder;
import org.web3j.abi.Utils;
import org.web3j.abi.datatypes.DynamicArray;
import org.web3j.abi.datatypes.DynamicBytes;
import org.web3j.abi.datatypes.Function;
import org.web3j.abi.datatypes.Type;
import org.web3j.crypto.Credentials;
import org.web3j.protocol.Web3jService;
Expand Down Expand Up @@ -103,8 +107,6 @@ public static class GetPrivacyPrecompileAddressResponse extends Response<Address
public static class GetPrivateTransactionResponse
extends Response<PrivateTransactionGroupResponse> {}

public static class JsonRpcSuccessResponseResponse extends Response<String> {}

public static class CreatePrivacyGroupResponse extends Response<String> {}

public static class DeletePrivacyGroupResponse extends Response<String> {}
Expand Down Expand Up @@ -324,8 +326,7 @@ public PrivxCreatePrivacyGroupResponse privxCreatePrivacyGroup(
Numeric.toHexString(
PrivateTransactionEncoder.signMessage(
privateTransaction, Credentials.create(creator.getTransactionSigningKey()))));
final EthSendTransaction ethSendTransaction = ethSendTransactionRequest.send();
final String transactionHash = ethSendTransaction.getTransactionHash();
final String transactionHash = ethSendTransactionRequest.send().getTransactionHash();
return new PrivxCreatePrivacyGroupResponse(privacyGroupId.toBase64String(), transactionHash);
}

Expand Down Expand Up @@ -590,17 +591,17 @@ public String getTransactionHash() {
}

private Bytes encodeAddToGroupFunctionCall(final List<Bytes> participants) {
final org.web3j.abi.datatypes.Function function =
new org.web3j.abi.datatypes.Function(
final Function function =
new Function(
"addParticipants",
Arrays.asList(
new org.web3j.abi.datatypes.DynamicArray<>(
org.web3j.abi.datatypes.DynamicBytes.class,
org.web3j.abi.Utils.typeMap(
new DynamicArray<>(
DynamicBytes.class,
Utils.typeMap(
participants.stream()
.map(Bytes::toArrayUnsafe)
.collect(Collectors.toList()),
org.web3j.abi.datatypes.DynamicBytes.class))),
DynamicBytes.class))),
Collections.emptyList());

return Bytes.fromHexString(FunctionEncoder.encode(function));
Expand Down

0 comments on commit ecde451

Please sign in to comment.