Skip to content

Commit

Permalink
feat(mpc): parametric project url for coordinator
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-aitlahcen committed Nov 21, 2024
1 parent ce83eaa commit 7aeb2e9
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions mpc/coordinator/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use clap::{Parser, Subcommand};
use mpc_shared::{phase2_verify, supabase::SupabaseMPCApi};

const SUPABASE_PROJECT: &str = "https://wwqpylbrcpriyaqugzsi.supabase.co";

#[derive(Parser, Debug)]
#[command(version, about, long_about = None)]
struct Args {
Expand All @@ -14,9 +12,9 @@ struct Args {
enum Command {
Start {
#[arg(short, long)]
jwt: String,
url: String,
#[arg(short, long)]
api_key: String,
jwt: String,
},
}

Expand All @@ -34,8 +32,8 @@ enum Error {
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let args = Args::parse();
match args.command {
Command::Start { jwt, api_key } => {
let client = SupabaseMPCApi::new(SUPABASE_PROJECT.into(), api_key, jwt);
Command::Start { url, jwt } => {
let client = SupabaseMPCApi::new(url, jwt.clone(), jwt);
let progress = |percent| async move { println!("downloaded: {:.2}%", percent) };
loop {
println!("downloading current payload...");
Expand Down

0 comments on commit 7aeb2e9

Please sign in to comment.