Skip to content

Commit

Permalink
fix: remove prefix form public key if present
Browse files Browse the repository at this point in the history
  • Loading branch information
metalurgical committed Sep 11, 2023
1 parent ef4d030 commit 298c7d0
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@ public class EthereumTssAccount {

public EthereumTssAccount(EthTssAccountParams params) {
ethAccountParams = params;
evmAddress = Keys.toChecksumAddress(Keys.getAddress(params.publicKey));
String prefix = "04";
String key;
if (params.publicKey.startsWith(prefix)) {
key = params.publicKey.substring(prefix.length());
} else {
key = params.publicKey;
}
evmAddress = Keys.toChecksumAddress(Keys.getAddress(key));
}

public String signMessage(String message) throws TSSClientError, CustomSigningError {
Expand Down

0 comments on commit 298c7d0

Please sign in to comment.