Skip to content

Commit

Permalink
additional logs
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan-rosianu committed Mar 14, 2024
1 parent 92252a0 commit fedc89e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion action/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -188161,6 +188161,7 @@ const robot = (app) => {
}
async function verify(body, address, message) {
const signature = /[0-9a-fA-F]{128}/.exec(body)?.at(0);
console.log(`verifying message: ${message}. Is signature = ${(!!signature)}`);
if (signature) {
const verifyResult = await verifySignature(signature, address, message);
console.log(`Verifying signature for address ${address}, message ${message}, and signature ${signature}. Result=${verifyResult}`);
Expand Down Expand Up @@ -188307,7 +188308,7 @@ const robot = (app) => {
await fail('No owners identified');
return;
}
console.log(`Asset owners. check mode=${checkMode}. value=${owners}`);
console.log(`Asset owners. check mode=${checkMode}. value=${owners}. Commit shas=${commitShas}`);
const invalidAddresses = await multiVerify(bodies, owners, commitShas);
if (!invalidAddresses) {
await fail('Failed to verify owners');
Expand Down
3 changes: 2 additions & 1 deletion src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ export const robot = (app: Probot) => {

async function verify(body: string, address: string, message: string): Promise<boolean | undefined> {
const signature = /[0-9a-fA-F]{128}/.exec(body)?.at(0);
console.log(`verifying message: ${message}. Is signature = ${(!!signature)}`);
if (signature) {
const verifyResult = await verifySignature(signature, address, message);
console.log(`Verifying signature for address ${address}, message ${message}, and signature ${signature}. Result=${verifyResult}`);
Expand Down Expand Up @@ -412,7 +413,7 @@ export const robot = (app: Probot) => {
return;
}

console.log(`Asset owners. check mode=${checkMode}. value=${owners}`);
console.log(`Asset owners. check mode=${checkMode}. value=${owners}. Commit shas=${commitShas}`);
const invalidAddresses = await multiVerify(bodies, owners, commitShas);
if (!invalidAddresses) {
await fail('Failed to verify owners');
Expand Down

0 comments on commit fedc89e

Please sign in to comment.