Skip to content

Commit

Permalink
refactor: remove some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
XuNeal committed Dec 13, 2023
1 parent 52c1283 commit 9832d03
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 30 deletions.
2 changes: 1 addition & 1 deletion imkey-core/ikc-wallet/coin-bch/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ impl BchTransaction {
//lock script
let pub_key_bytes = hex::decode(utxo_pub_key_vec.get(index).unwrap())?;
let pub_key_hash = hash160::Hash::hash(&pub_key_bytes).into_inner();
let script_hex = format!("76a914{}88ac", hex::encode(pub_key_hash));
let script_hex: String = format!("76a914{}88ac", hex::encode(pub_key_hash));
// let script = Script::from(hex::decode(script_hex)?);
let script = Script::from_hex(script_hex.as_str())?;
let script_data = serialize(&script);
Expand Down
1 change: 0 additions & 1 deletion token-core/tcx-keystore/src/keystore/private.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ impl PrivateKeystore {
pub fn from_private_key(private_key: &str, password: &str, meta: Metadata) -> PrivateKeystore {
let key_data: Vec<u8> = Vec::from_hex_auto(private_key).expect("hex can't decode");
let key_hash = key_hash_from_private_key(&key_data);
// let pk_bytes = Vec::from_hex(private_key).expect("valid private_key");
let crypto: Crypto = Crypto::new(password, &key_data);
let unlocker = crypto
.use_key(&Key::Password(password.to_string()))
Expand Down
25 changes: 0 additions & 25 deletions token-core/tcx-proto/src/params.proto
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ message ImportMnemonicParam {
bool overwrite = 6;
}

// FUNCTION: hd_store_derive(HdStoreDeriveParam): DeriveAccountsResult
//
// derive new accounts from a hd keystore
message DeriveAccountsParam {
Expand Down Expand Up @@ -112,12 +111,6 @@ message PrivateKeyStoreExportParam {
string network = 4;
}

/// Keystore Common

// FUNCTION: delete_keystore(WalletKeyParam) -> Response
//
// delete the keystore

// FUNCTION: keystore_common_exists(KeystoreCommonExistsParam): ExistsKeystoreResult
//
// Check is there a keystore was generate by the special privateKey or mnemonic
Expand Down Expand Up @@ -205,24 +198,6 @@ message RemoveWalletResult {
bool isSuccess = 1;
}

// message V3KeystoreImportInput {
// string keystore = 1;
// string password = 2;
// bool overwrite = 3;
// string name = 4;
// string chainType = 5;
// string source = 6;
// }

// message V3KeystoreExportInput {
// string id = 1;
// string password = 2;
// }

// message V3KeystoreExportOutput {
// string json = 1;
// }

message EncryptDataToIpfsParam {
string identifier = 1;
string content = 2;
Expand Down
1 change: 0 additions & 1 deletion token-core/tcx/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ pub struct ImportMnemonicParam {
#[prost(bool, tag = "6")]
pub overwrite: bool,
}
/// FUNCTION: hd_store_derive(HdStoreDeriveParam): DeriveAccountsResult
///
/// derive new accounts from a hd keystore
#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down
4 changes: 2 additions & 2 deletions token-core/tcx/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3302,8 +3302,8 @@ mod tests {
path: "m/44'/60'/0'/0/0".to_string(),
network: "".to_string(),
seg_wit: "".to_string(),
chain_id: "".to_string(),
curve: "".to_string(),
chain_id: "1".to_string(),
curve: "SECP256k1".to_string(),
bech32_prefix: "".to_string(),
};

Expand Down

0 comments on commit 9832d03

Please sign in to comment.