Skip to content

Commit

Permalink
fix: rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
j75689 committed Nov 24, 2023
1 parent f2d5791 commit b58379f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/BC_fusion/AirDrop.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ contract AirDrop is IAirDrop, ReentrancyGuardUpgradeable, System {
bytes calldata ownerPubKey, bytes calldata ownerSignature, bytes calldata approvalSignature,
bytes32[] calldata merkleProof) nonReentrant external override {
// Recover the owner address and check signature.
bytes memory ownerAddr = _recoverFromTendermintSecp256k1Sig(ownerPubKey, ownerSignature, _tmSignatureHash(tokenSymbol, amount, msg.sender));
bytes memory ownerAddr = _verifySecp256k1Sig(ownerPubKey, ownerSignature, _tmSignatureHash(tokenSymbol, amount, msg.sender));
// Generate the leaf node of merkle tree.
bytes32 node = keccak256(abi.encodePacked(ownerAddr, tokenSymbol, amount));

Expand Down Expand Up @@ -59,7 +59,7 @@ contract AirDrop is IAirDrop, ReentrancyGuardUpgradeable, System {
require(ECDSA.recover(hash, approvalSignature) == approvalAddress, "InvalidSignature");
}

function _recoverFromTendermintSecp256k1Sig(bytes memory pubKey, bytes memory signature, bytes32 messageHash) internal view returns (bytes memory) {
function _verifySecp256k1Sig(bytes memory pubKey, bytes memory signature, bytes32 messageHash) internal view returns (bytes memory) {
// Ensure the public key is valid
require(pubKey.length == 33, "Invalid pubKey length");
// Ensure the signature length is correct
Expand Down

0 comments on commit b58379f

Please sign in to comment.