Skip to content

Commit

Permalink
rename files
Browse files Browse the repository at this point in the history
  • Loading branch information
richardliang committed Dec 6, 2023
1 parent 8b1d7c6 commit 48079b6
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pragma circom 2.1.5;

include "@zk-email/circuits/regexes/regex_helpers.circom";

template VenmoPayeeIdRegex(msg_bytes) {
template VenmoSendIdRegex(msg_bytes) {
signal input msg[msg_bytes];
signal output out;

Expand Down
3 changes: 0 additions & 3 deletions circuits-circom/test/mocks/venmo/test_venmo_payee_id.circom

This file was deleted.

3 changes: 3 additions & 0 deletions circuits-circom/test/mocks/venmo/test_venmo_send_id.circom
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include "../../../regexes/venmo/venmo_send_id.circom";

component main = VenmoSendIdRegex(430);
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const wasm_tester = require("circom_tester").wasm;

const fs = require('fs');

describe("Venmo payee id", function () {
describe("Venmo send id", function () {
jest.setTimeout(10 * 60 * 1000); // 10 minutes

let cir;
Expand All @@ -22,10 +22,10 @@ describe("Venmo payee id", function () {

beforeAll(async () => {
cir = await wasm_tester(
path.join(__dirname, "../../mocks/venmo/test_venmo_payee_id.circom"),
path.join(__dirname, "../../mocks/venmo/test_venmo_send_id.circom"),
{
include: path.join(__dirname, "../../../node_modules"),
output: path.join(__dirname, "../../../build/test_venmo_payee_id"),
output: path.join(__dirname, "../../../build/test_venmo_send_id"),
recompile: true,
verbose: true,
}
Expand Down Expand Up @@ -146,7 +146,7 @@ describe("Venmo payee id", function () {
it("Should fail to match regex", async () => {
const input = {
"msg": textToAsciiArray(
"EEEEEEEEEEE<!-- recipient name -->\r\n" // Update to `p`
"EEEEEEEEEEE<!-- recipient name -->\r\n"
+ " <a style=3D\"color:#0074DE; text-decoration:none\"\r\n"
+ " =20\r\n"
+ " href=3D\"https://venmo.com/code?user_id=3D27443255215553=\r\n"
Expand All @@ -156,7 +156,7 @@ describe("Venmo payee id", function () {
+ " </a>\r\n"
+ " =20\r\n"
+ " </div>\r\n"
+ " <!-- n0te -->\r\n"
+ " <!-- note -->\r\n"
+ " <div>\r\n"
+ " <p>"
)
Expand Down
6 changes: 3 additions & 3 deletions circuits-circom/venmo_send.circom
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ include "./utils/email_nullifier.circom";
include "./utils/extract.circom";
include "./utils/hash_sign_gen_rand.circom";
include "./regexes/common/from_regex.circom";
include "./regexes/venmo/venmo_send_amount.circom";
include "./regexes/venmo/venmo_p2p_check.circom";
include "./regexes/venmo/venmo_payee_id.circom";
include "./regexes/venmo/venmo_send_amount.circom";
include "./regexes/venmo/venmo_send_id.circom";
include "./regexes/venmo/venmo_timestamp.circom";

template VenmoSendEmail(max_header_bytes, max_body_bytes, n, k, pack_size) {
Expand Down Expand Up @@ -100,7 +100,7 @@ template VenmoSendEmail(max_header_bytes, max_body_bytes, n, k, pack_size) {
signal input venmo_payer_id_idx;
signal reveal_payer_packed[max_venmo_id_packed_bytes];

signal (payee_regex_out, payee_regex_reveal[max_body_bytes], payer_regex_reveal[max_body_bytes]) <== VenmoPayeeIdRegex(max_body_bytes)(in_body_padded);
signal (payee_regex_out, payee_regex_reveal[max_body_bytes], payer_regex_reveal[max_body_bytes]) <== VenmoSendIdRegex(max_body_bytes)(in_body_padded);
signal is_found_payee <== IsZero()(payee_regex_out);
is_found_payee === 0;

Expand Down

0 comments on commit 48079b6

Please sign in to comment.