From 186b4ad0a29ecaae66ef605505145c79df9c0da7 Mon Sep 17 00:00:00 2001 From: Vaibhav Date: Fri, 28 Jun 2024 19:26:31 +0530 Subject: [PATCH] chore: rename to post_transaction ledger/mod.rs --- cala-ledger/src/ledger/mod.rs | 6 +++--- cala-ledger/tests/account_set.rs | 2 +- cala-ledger/tests/transaction_post.rs | 4 ++-- cala-server/src/graphql/schema.rs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cala-ledger/src/ledger/mod.rs b/cala-ledger/src/ledger/mod.rs index adacea98..5c6ac235 100644 --- a/cala-ledger/src/ledger/mod.rs +++ b/cala-ledger/src/ledger/mod.rs @@ -131,7 +131,7 @@ impl CalaLedger { &self.transactions } - pub async fn transaction_post( + pub async fn post_transaction( &self, tx_id: TransactionId, tx_template_code: &str, @@ -139,7 +139,7 @@ impl CalaLedger { ) -> Result { let mut op = AtomicOperation::init(&self.pool, &self.outbox).await?; let transaction = self - .transaction_post_in_op(&mut op, tx_id, tx_template_code, params) + .post_transaction_in_op(&mut op, tx_id, tx_template_code, params) .await?; op.commit().await?; Ok(transaction) @@ -151,7 +151,7 @@ impl CalaLedger { fields(transaction_id, external_id) err )] - pub async fn transaction_post_in_op( + pub async fn post_transaction_in_op( &self, op: &mut AtomicOperation<'_>, tx_id: TransactionId, diff --git a/cala-ledger/tests/account_set.rs b/cala-ledger/tests/account_set.rs index 52b61995..e9a17087 100644 --- a/cala-ledger/tests/account_set.rs +++ b/cala-ledger/tests/account_set.rs @@ -135,7 +135,7 @@ async fn balances() -> anyhow::Result<()> { params.insert("journal_id", journal.id().to_string()); params.insert("sender", sender_account.id()); params.insert("recipient", recipient_account.id()); - cala.transaction_post(TransactionId::new(), &tx_code, params) + cala.post_transaction(TransactionId::new(), &tx_code, params) .await .unwrap(); diff --git a/cala-ledger/tests/transaction_post.rs b/cala-ledger/tests/transaction_post.rs index 537d899b..99facb7a 100644 --- a/cala-ledger/tests/transaction_post.rs +++ b/cala-ledger/tests/transaction_post.rs @@ -31,7 +31,7 @@ async fn transaction_post() -> anyhow::Result<()> { params.insert("sender", sender_account.id()); params.insert("recipient", recipient_account.id()); - cala.transaction_post(TransactionId::new(), &tx_code, params) + cala.post_transaction(TransactionId::new(), &tx_code, params) .await .unwrap(); @@ -40,7 +40,7 @@ async fn transaction_post() -> anyhow::Result<()> { params.insert("journal_id", journal.id()); params.insert("sender", sender_account.id()); params.insert("recipient", recipient_account.id()); - cala.transaction_post(TransactionId::new(), &tx_code, params) + cala.post_transaction(TransactionId::new(), &tx_code, params) .await .unwrap(); let recipient_balance = cala diff --git a/cala-server/src/graphql/schema.rs b/cala-server/src/graphql/schema.rs index 99ac85f8..9dd0cc1f 100644 --- a/cala-server/src/graphql/schema.rs +++ b/cala-server/src/graphql/schema.rs @@ -601,7 +601,7 @@ impl CoreMutation { let params = input.params.map(cala_ledger::tx_template::Params::from); let transaction = app .ledger() - .transaction_post_in_op( + .post_transaction_in_op( &mut op, input.transaction_id.into(), &input.tx_template_code,