Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [[Unreleased]]

### Added
- Support for `XLS-39` Clawback amendment (Amendment ID: 56B241D7A43D40354D02A9DC4C8DF5C7A1F930D92A9035C4E12291B3CA3E1C2B)

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion src/asynch/clients/async_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub trait XRPLAsyncClient: XRPLClient {
let server_state = self.request(ServerState::new(None).into()).await?;
let server_state: ServerStateResult = server_state.try_into()?;
let common_fields = CommonFields {
network_id: None, // TODO Server state has no network ID.
network_id: server_state.state.network_id,
build_version: Some(server_state.state.build_version),
};

Expand Down
12 changes: 9 additions & 3 deletions src/models/exceptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ use crate::XRPLSerdeJsonError;
use super::{
results::exceptions::XRPLResultException,
transactions::exceptions::{
XRPLAccountSetException, XRPLNFTokenCancelOfferException, XRPLNFTokenCreateOfferException,
XRPLPaymentException, XRPLSignerListSetException, XRPLTransactionException,
XRPLXChainClaimException, XRPLXChainCreateBridgeException,
XRPLAccountSetException, XRPLClawbackException, XRPLNFTokenCancelOfferException,
XRPLNFTokenCreateOfferException, XRPLPaymentException, XRPLSignerListSetException,
XRPLTransactionException, XRPLXChainClaimException, XRPLXChainCreateBridgeException,
XRPLXChainCreateClaimIDException, XRPLXChainModifyBridgeException,
},
};
Expand Down Expand Up @@ -152,3 +152,9 @@ impl From<XRPLXChainModifyBridgeException> for XRPLModelException {
XRPLModelException::XRPLTransactionError(error.into())
}
}

impl From<XRPLClawbackException> for XRPLModelException {
fn from(error: XRPLClawbackException) -> Self {
XRPLModelException::XRPLTransactionError(error.into())
}
}
2 changes: 2 additions & 0 deletions src/models/results/server_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ pub struct State<'a> {
pub peer_disconnects: Option<Cow<'a, str>>,
/// Count of resource-related peer disconnections
pub peer_disconnects_resources: Option<Cow<'a, str>>,
/// The network ID of the server's network
pub network_id: Option<u32>,
/// Number of other rippled servers currently connected
pub peers: Option<u32>,
/// Public key used for peer-to-peer communications
Expand Down
16 changes: 9 additions & 7 deletions src/models/transactions/account_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,18 @@ pub enum AccountSetFlag {
/// on this account's behalf. Specify the authorized account in the
/// NFTokenMinter field of the AccountRoot object.
AsfAuthorizedNFTokenMinter = 10,
/// Disallow incoming NFToken offers from other accounts.
AsfDisallowIncomingNFTokenOffer = 12,
/// Disallow incoming Checks from other accounts.
AsfDisallowIncomingCheck = 11,
AsfDisallowIncomingCheck = 13,
/// Disallow incoming Payment Channels from other accounts.
AsfDisallowIncomingPayChan = 12,
AsfDisallowIncomingPayChan = 14,
/// Disallow incoming trust lines from other accounts.
AsfDisallowIncomingTrustline = 13,
/// Disallow incoming NFToken offers from other accounts.
AsfDisallowIncomingNFTokenOffer = 14,
/// Allow other accounts to mint NFTokens with this account set as the issuer.
AsfAllowTrustLineClawback = 15,
AsfDisallowIncomingTrustline = 15,
/// Allow clawback of tokens issued by this account.
/// This flag can only be set if the account has no trust lines.
/// Once set, it cannot be unset.
AsfAllowTrustLineClawback = 16,
}

/// An AccountSet transaction modifies the properties of an
Expand Down
Loading
Loading