Assessment reports>Mina Token Bridge>Discussion>Misleading function name

Misleading function name

The Mina Bridge contract contains a function as follows:

public async verifyMsg(publicKey: PublicKey, msg: Field[], sig: Signature) {
  const isOk = await sig.verify(publicKey, msg);
  Provable.log("isOk", isOk.toString());
}

The name may be interpreted that this function ensures that the signature is correct. However, the function only prints whether or not the signature is correct. While this function is not used in the within-scope code, misleading function names can result in incorrect usage by developers at a later time, so we recommend to rename this function to better reflect its functionality.

Zellic © 2025Back to top ↑