Skip to content

Commit c7b38b3

Browse files
committed
api: Deprecate get_new_payments
1 parent f9943b7 commit c7b38b3

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

app-rs/src/client.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -692,13 +692,9 @@ impl AppNodeRunApi for NodeClient {
692692

693693
async fn get_new_payments(
694694
&self,
695-
req: GetNewPayments,
695+
_: GetNewPayments,
696696
) -> Result<VecBasicPaymentV1, NodeApiError> {
697-
self.ensure_authed().await?;
698-
let run_url = &self.run_url;
699-
let url = format!("{run_url}/app/payments/new");
700-
let req = self.run_rest.get(url, &req);
701-
self.run_rest.send(req).await
697+
unimplemented!("Deprecated")
702698
}
703699

704700
async fn get_updated_payments(

lexe-api-core/src/def.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,8 @@ pub trait AppNodeRunApi {
360360
) -> Result<VecBasicPaymentV1, NodeApiError>;
361361

362362
/// GET /app/payments/new [`GetNewPayments`] -> [`VecBasicPaymentV1`]
363+
#[deprecated(note = "since app-v0.8.9+29 and sdk-sidecar-v0.3.1: \
364+
Use get_updated_payments instead")]
363365
async fn get_new_payments(
364366
&self,
365367
req: GetNewPayments,
@@ -785,6 +787,11 @@ pub trait NodeBackendApi {
785787
/// a known [`PaymentCreatedIndex`] (exclusive).
786788
/// Results are in ascending order, by `(created_at, payment_id)`.
787789
/// See [`GetNewPayments`] for more info.
790+
#[deprecated(note = "since app-v0.8.9+29 and sdk-sidecar-v0.3.1: \
791+
Use get_updated_payments instead")]
792+
// NOTE: This fn is used in the app->node handler for /app/payments/new, so
793+
// the node->backend client code must remain until all app and sdk-sidecar
794+
// clients have been updated.
788795
async fn get_new_payments(
789796
&self,
790797
req: GetNewPayments,

node/src/client.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,9 @@ impl NodeBackendApi for NodeBackendClient {
575575
req: GetNewPayments,
576576
auth: BearerAuthToken,
577577
) -> Result<VecDbPaymentV1, BackendApiError> {
578+
// NOTE: This fn is used in the app->node handler for /app/payments/new,
579+
// so the node->backend client code must remain until all app and
580+
// sdk-sidecar clients have been updated.
578581
let backend = &self.backend_url;
579582
let req = self
580583
.rest

node/src/persister.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,10 @@ impl NodePersister {
470470
req: GetNewPayments,
471471
) -> anyhow::Result<Vec<BasicPaymentV1>> {
472472
let token = self.get_token().await?;
473+
// NOTE: This fn is used in the app->node handler for /app/payments/new,
474+
// so the node->backend client code must remain until all app and
475+
// sdk-sidecar clients have been updated.
476+
#[allow(deprecated)]
473477
self.backend_api
474478
.get_new_payments(req, token)
475479
.await

0 commit comments

Comments
 (0)