Skip to content

Commit

Permalink
Merge pull request #90 from sephynox/sidechains
Browse files Browse the repository at this point in the history
Sidechain support
  • Loading branch information
LimpidCrypto authored Oct 19, 2024
2 parents b39c5bf + 490f176 commit e4e8169
Show file tree
Hide file tree
Showing 38 changed files with 4,136 additions and 764 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ async-std = { version = "1.13.0", optional = true }
futures-executor = { version = "0.3.30", optional = true }
futures-timer = { version = "3.0.3", optional = true }
smol = { version = "2.0.2", optional = true }
bigdecimal = { version = "0.4.5", features = ["serde-json"] }

[dev-dependencies]
criterion = "0.5.1"
Expand Down
5 changes: 2 additions & 3 deletions src/asynch/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ use crate::{
Err,
};

use alloc::string::String;
use alloc::string::ToString;
use alloc::vec::Vec;
use alloc::{borrow::Cow, vec};
use alloc::string::String;
use anyhow::Result;
use core::convert::TryInto;
use core::fmt::Debug;
Expand Down Expand Up @@ -537,7 +537,7 @@ mod test_autofill {
#[cfg(all(feature = "websocket", feature = "std"))]
#[cfg(test)]
mod test_sign {
use alloc::{borrow::Cow, dbg};
use alloc::borrow::Cow;

use crate::{
asynch::{
Expand Down Expand Up @@ -587,7 +587,6 @@ mod test_sign {
let wallet = generate_faucet_wallet(&client, None, None, None, None)
.await
.unwrap();
dbg!(&wallet);
let mut tx = AccountSet::new(
Cow::from(wallet.classic_address.clone()),
None,
Expand Down
7 changes: 7 additions & 0 deletions src/core/binarycodec/exceptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pub enum XRPLBinaryCodecException {
XRPRangeError(XRPRangeException),
SerdeJsonError(serde_json::error::Category),
DecimalError(rust_decimal::Error),
BigDecimalError(bigdecimal::ParseBigDecimalError),
ISOCodeError(ISOCodeException),
FieldHasNoAssiciatedTag,
XAddressTagMismatch,
Expand Down Expand Up @@ -85,5 +86,11 @@ impl From<alloc::string::FromUtf8Error> for XRPLBinaryCodecException {
}
}

impl From<bigdecimal::ParseBigDecimalError> for XRPLBinaryCodecException {
fn from(err: bigdecimal::ParseBigDecimalError) -> Self {
XRPLBinaryCodecException::BigDecimalError(err)
}
}

#[cfg(feature = "std")]
impl alloc::error::Error for XRPLBinaryCodecException {}
1 change: 0 additions & 1 deletion src/core/binarycodec/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ fn _decode_field_id(field_id: &str) -> Result<FieldHeader, XRPLBinaryCodecExcept
pub fn encode_field_name(field_name: &str) -> Result<Vec<u8>, XRPLBinaryCodecException> {
let definitions = load_definition_map();
let field_header = definitions.get_field_header_from_name(field_name);

if let Some(header) = field_header {
_encode_field_id(&header)
} else {
Expand Down
Loading

0 comments on commit e4e8169

Please sign in to comment.