diff --git a/imkey-core/ikc-common/src/constants.rs b/imkey-core/ikc-common/src/constants.rs index 78e087c8..b45761c0 100644 --- a/imkey-core/ikc-common/src/constants.rs +++ b/imkey-core/ikc-common/src/constants.rs @@ -1,6 +1,6 @@ pub const VERSION: &str = "2.16.0"; -// pub const URL: &str = "https://imkey.online:1000/imkey"; -pub const URL: &str = "https://imkeyserver.com:10444/imkey"; +pub const URL: &str = "https://imkey.online:1000/imkey"; +// pub const URL: &str = "https://imkeyserver.com:10444/imkey"; pub const TSM_ACTION_SE_SECURE_CHECK: &str = "/seSecureCheck"; pub const TSM_ACTION_APP_DOWNLOAD: &str = "/appDownload"; diff --git a/imkey-core/ikc-wallet/coin-bitcoin/src/transaction.rs b/imkey-core/ikc-wallet/coin-bitcoin/src/transaction.rs index 5f014147..b4e93cee 100644 --- a/imkey-core/ikc-wallet/coin-bitcoin/src/transaction.rs +++ b/imkey-core/ikc-wallet/coin-bitcoin/src/transaction.rs @@ -24,6 +24,7 @@ use ikc_transport::message::{send_apdu, send_apdu_timeout}; use secp256k1::ecdsa::Signature; use std::borrow::Borrow; use std::str::FromStr; +use secp256k1::PublicKey; #[derive(Clone)] pub struct Utxo { @@ -342,7 +343,8 @@ impl BtcTransaction { data.extend(path_data.iter()); let mut tweaked_pub_key_data: Vec = vec![]; - let untweaked_public_key = UntweakedPublicKey::from_str(&pub_key[2..66])?; + let public_key = PublicKey::from_str(pub_key)?; + let untweaked_public_key = UntweakedPublicKey::from(public_key); let tweaked_pub_key = TapTweakHash::from_key_and_tweak(untweaked_public_key, None).to_vec(); tweaked_pub_key_data.push(tweaked_pub_key.len() as u8); tweaked_pub_key_data.extend_from_slice(&tweaked_pub_key); diff --git a/imkey-core/ikc-wallet/coin-ckb/src/signer.rs b/imkey-core/ikc-wallet/coin-ckb/src/signer.rs index 525613ee..2dae2d42 100644 --- a/imkey-core/ikc-wallet/coin-ckb/src/signer.rs +++ b/imkey-core/ikc-wallet/coin-ckb/src/signer.rs @@ -379,6 +379,7 @@ mod tests { receiver: "ckt1qyqtr684u76tu7r8efkd24hw8922xfvhnazskzdzy6".to_string(), sender: "ckt1qyqtr684u76tu7r8efkd24hw8922xfvhnazskzdzy6".to_string(), fee: "0.0001191 ckb".to_string(), + seg_wit: "".to_string(), }; let tx_output = CkbSigner::sign_transaction(&tx_input, &sign_param).expect("sign error"); diff --git a/imkey-core/ikc-wallet/coin-filecoin/src/transaction.rs b/imkey-core/ikc-wallet/coin-filecoin/src/transaction.rs index 1338b936..31aa0f92 100644 --- a/imkey-core/ikc-wallet/coin-filecoin/src/transaction.rs +++ b/imkey-core/ikc-wallet/coin-filecoin/src/transaction.rs @@ -188,6 +188,7 @@ mod tests { receiver: "f1d2xrzcslx7xlbbylc5c3d5lvandqw4iwl6epxba".to_string(), sender: "f1o2ph66tg7o7obyrqa7eiwiinrltauzxitkuk4ay".to_string(), fee: "0.1 FILECOIN".to_string(), + seg_wit: "".to_string(), }; let tx_result = Transaction::sign_tx(tx_input, &sign_param).unwrap(); diff --git a/token-core/tcx-btc-kin/src/address.rs b/token-core/tcx-btc-kin/src/address.rs index 6a734e49..eec26826 100644 --- a/token-core/tcx-btc-kin/src/address.rs +++ b/token-core/tcx-btc-kin/src/address.rs @@ -504,6 +504,7 @@ mod tests { curve: CurveType::SECP256k1, network: "MAINNET".to_string(), seg_wit: "NONE".to_string(), + hrp: "".to_string(), }) .unwrap(); assert_eq!(account.address, "DQ4tVEqdPWHc1aVBm4Sfwft8XyNRPMEchR");