1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
use crate::{types::OperationBody, IntoMuxedAccountId, Operation, StellarSdkError};

impl Operation {
    pub fn new_account_merge<S: IntoMuxedAccountId>(
        destination_account: S,
    ) -> Result<Operation, StellarSdkError> {
        Ok(Operation {
            source_account: None,
            body: OperationBody::AccountMerge(destination_account.into_muxed_account_id()?),
        })
    }
}