Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions sdk-core/src/main/java/org/fisco/bcos/sdk/utils/Hex.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@
public class Hex {
private static final HexEncoder encoder = new HexEncoder();

public static String addPrefix(String data) {
if (Objects.isNull(data)) {
return data;
}

if (data.startsWith("0x")) {
return data;
}

return "0x" + data;
}

public static String trimPrefix(String data) {
if (Objects.nonNull(data) && data.startsWith("0x")) {
return data.substring(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ public static Pair<String, String> getChainIdAndGroupId(Client client) {
String chainId = client.getChainId();
// get group
String group = client.getGroup();
logger.debug(
"createTransactionManager for >=rc2 node, chainId: {}, groupId: {}",
chainId,
group);
logger.debug("createTransactionManager, chainId: {}, groupId: {}", chainId, group);
return Pair.of(chainId, group);
}

Expand Down