Rename function

This commit is contained in:
Sik Yoon 2023-08-12 18:04:37 +09:00
parent 6ef75f20e1
commit 10924bfa31
2 changed files with 4 additions and 4 deletions

View File

@ -348,8 +348,8 @@ pub async fn set_is_tradable() {
.unwrap();
}
// check it's tradable or not
pub async fn check_is_tradable() -> bool {
// get is_tradable
pub async fn get_is_tradable() -> bool {
let asset_info = select_asset_manage_announcement().await;
let is_tradable = asset_info.is_tradable;

View File

@ -120,7 +120,7 @@ pub async fn buy_coin(
) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
// check conditions for buying
set_is_tradable().await;
let mut is_tradable = check_is_tradable().await;
let mut is_tradable = get_is_tradable().await;
let mut suggested_coin = select_suggested_coin().await;
let mut delete_condition = String::from("WHERE ");
let mut is_exist_delete_symbol: bool = false;
@ -335,7 +335,7 @@ pub async fn buy_coin(
}
set_is_tradable().await;
is_tradable = check_is_tradable().await;
is_tradable = get_is_tradable().await;
let update_table_name = String::from("suggested_coin_list");
let update_condition = vec![(String::from("id"), element.id.to_string())];