Skip to content

Commit 5c54ddb

Browse files
committed
pad address with hex prefix 0x
1 parent cacf073 commit 5c54ddb

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

mm2src/coins/eth/wallet_connect.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ impl<'a> WcEthTxParams<'a> {
6262
fn prepare_wc_tx_format(&self) -> MmResult<serde_json::Value, EthWalletConnectError> {
6363
let mut tx_object = serde_json::Map::from_iter([
6464
("nonce".to_string(), json!(u256_to_hex(self.nonce))),
65-
("from".to_string(), json!(format!("{:x}", self.my_address))),
65+
("from".to_string(), json!(format!("0x{:x}", self.my_address))),
6666
("gas".to_string(), json!(u256_to_hex(self.gas))),
6767
("value".to_string(), json!(u256_to_hex(self.value))),
68-
("data".to_string(), json!(format!("0x{}", hex::encode(self.data)))),
68+
("data".to_string(), json!(format!("0x{:?}", self.data))),
6969
]);
7070

7171
if let Some(gas_price) = self.gas_price {

mm2src/kdf_walletconnect/src/connection_handler.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl ConnectionHandler for Handler {
4343
}
4444

4545
fn message_received(&mut self, message: PublishedMessage) {
46-
debug!(
46+
info!(
4747
"[{}] inbound message: message_id={} topic={} tag={} message={}",
4848
self.name, message.message_id, message.topic, message.tag, message.message,
4949
);

mm2src/kdf_walletconnect/src/session/rpc/ping.rs

+2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ pub(crate) async fn reply_session_ping_request(
1919
pub async fn send_session_ping_request(ctx: &WalletConnectCtxImpl, topic: &Topic) -> MmResult<(), WalletConnectError> {
2020
let param = RequestParams::SessionPing(());
2121
let (rx, ttl) = ctx.publish_request(topic, param).await?;
22+
println!("ping sent successfuly");
2223
rx.timeout(ttl)
2324
.await
2425
.map_to_mm(|_| WalletConnectError::TimeoutError)?
2526
.map_to_mm(|err| WalletConnectError::InternalError(err.to_string()))??;
27+
println!("ping sent successfuly");
2628

2729
Ok(())
2830
}

0 commit comments

Comments
 (0)