From 44f69ccf0e241a5071a4b9e8f56f7e1ca3f4d0d7 Mon Sep 17 00:00:00 2001 From: aya015757881 <2581015450@qq.com> Date: Mon, 8 Jul 2024 10:08:32 +0800 Subject: [PATCH] refactor: remove 0x from ripple transaction id and make it uppercase --- Cargo.lock | 2 +- anychain-ripple/Cargo.toml | 2 +- anychain-ripple/src/transaction.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 39982b6..1279c6d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -300,7 +300,7 @@ dependencies = [ [[package]] name = "anychain-ripple" -version = "0.1.8" +version = "0.1.9" dependencies = [ "anychain-core", "base58", diff --git a/anychain-ripple/Cargo.toml b/anychain-ripple/Cargo.toml index 6de8a90..d2dd2ed 100644 --- a/anychain-ripple/Cargo.toml +++ b/anychain-ripple/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "anychain-ripple" description = "A Rust library for interacting with the Ripple blockchain. It provides core functionalities such as transaction signing and serialization, address generation, and network communication." -version = "0.1.8" +version = "0.1.9" keywords = ["ripple", "blockchain", "cryptocurrencies", "wallet", "transactions"] # Workspace inherited keys diff --git a/anychain-ripple/src/transaction.rs b/anychain-ripple/src/transaction.rs index 8f5f4b0..a07fe36 100644 --- a/anychain-ripple/src/transaction.rs +++ b/anychain-ripple/src/transaction.rs @@ -398,7 +398,7 @@ impl TransactionId for RippleTransactionId {} impl fmt::Display for RippleTransactionId { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "0x{}", hex::encode(&self.txid)) + write!(f, "{}", hex::encode(&self.txid).to_uppercase()) } }