Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions vesting-backend/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub struct VestingResp {
pub is_success: bool,
pub error_message: Option<String>,
pub page_index: Option<u8>,
pub amount_unlocked: u64,
pub amount_unlocked: u64,
pub amount_locked: u64,
}

Expand Down Expand Up @@ -198,7 +198,7 @@ pub async fn submit_signature(
dropped_item.signature = Some(result.1);
update_data_in_file(path_to_drop_file, dropped_item);
return HttpResponse::Ok().body(serde_json::to_string(&ret).unwrap());
// }
// }

} else if post_params.network == 1 {
let cosmos_public_without_prefix = post_params.cosmos_public_without_prefix.clone().unwrap();
Expand Down Expand Up @@ -261,7 +261,7 @@ pub async fn submit_signature(
}
}
else if post_params.network == 2 {
let result = verify::verify_polkadot_signature(post_params.message_bytes.unwrap().as_slice(), post_params.signatures_bytes.unwrap().as_slice(), &post_params.pubkey);
let result = verify::verify_polkadot_signature(post_params.message.as_bytes(), post_params.signatures_bytes.unwrap().as_slice(), &post_params.pubkey);
if result {
let mut dropped_item = DroppedItem{
address: post_params.pubkey.clone(),
Expand Down Expand Up @@ -383,7 +383,7 @@ pub async fn get_submit_signature(
// return HttpResponse::Ok().body(serde_json::to_string(&ret).unwrap());
// }



// //read data from json file
// let json_data_from_file = std::fs::read_to_string(path_to_drop_file).expect("Unable to read file");
Expand Down Expand Up @@ -411,7 +411,7 @@ pub async fn get_submit_signature(

// let amount_unlocked = ui_amount_to_token_amount(claimant_entity.unwrap().amount_unlocked);
// let amount_locked = ui_amount_to_token_amount(claimant_entity.unwrap().amount_locked);

// std::fs::write(path_to_drop_file, json_data).expect("Unable to write file");
// let result = call_process_admin_claim(claimant, amount_unlocked, amount_locked, 1);
// if !result{
Expand Down Expand Up @@ -443,7 +443,7 @@ pub async fn get_submit_signature(
// };
// return HttpResponse::Ok().body(serde_json::to_string(&ret).unwrap());
// }
// }
// }
// // else if post_params.network == 2 {
// // let result = verify::verify_polkadot_signature(&post_params.message.as_bytes(), &post_params.signatures.as_bytes(), &post_params.pubkey);
// // let result2 = verify::verify_polkadot_signature_ed25519(&post_params.message.as_bytes(), &post_params.signatures.as_bytes(), &post_params.pubkey);
Expand Down Expand Up @@ -558,26 +558,26 @@ pub async fn get_submit_signature(
get,
path = "/vesting/domain/status",
params(

),
responses(

)
)]
pub async fn status(
) -> impl Responder {
return HttpResponse::Ok().body("Vesting Service are active and ready to accept requests");

}

#[utoipa::path(
get,
path = "/vesting/domain/settestvesting",
params(

),
responses(

)
)]
pub async fn set_test_vesting(
Expand Down