Skip to content

Commit ee466a9

Browse files
committed
refactor: Rename PaymentListenerDurable to PaymentListener
1 parent 87e1f38 commit ee466a9

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

src/durable/payment-listener-durable.ts renamed to src/durable/payment-listener.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { rawToNano } from '../utils';
55
import { logger } from '../logger';
66
import { INVOICE_MIN_AMOUNT } from '../constants';
77

8-
export class PaymentListenerDurable extends DurableObject<Env> {
8+
export class PaymentListener extends DurableObject<Env> {
99
private nanoWebsocket: NanoWebsocket;
1010
private pendingInvoices: { id: string; expiresAt: string; payAddress: string; payments: Payment[] }[] = [];
1111

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { isFalsyLike } from './utils';
88
/*
99
* Export our Durable Object classes here.
1010
*/
11-
export { PaymentListenerDurable } from './durable/payment-listener-durable';
11+
export { PaymentListener } from './durable/payment-listener';
1212

1313
/*
1414
* This is the main entry point for your Worker.

worker-configuration.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interface Env {
1515
RPC_URLS: string;
1616
WORKER_URLS: string;
1717
IS_LOCAL_MODE: string;
18-
PAYMENT_LISTENER_DURABLE: DurableObjectNamespace<import("./src/index").PaymentListenerDurable>;
18+
PAYMENT_LISTENER_DURABLE: DurableObjectNamespace<import('./src/index').PaymentListener>;
1919
PAYMENT_LISTENER_QUEUE: Queue;
2020
PAYMENT_RECEIVER_QUEUE: Queue;
2121
PAYMENT_WRITE_QUEUE: Queue;

wrangler.toml

+6-4
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,12 @@ logpush = true
8888

8989
[[durable_objects.bindings]]
9090
name = "PAYMENT_LISTENER_DURABLE"
91-
class_name = "PaymentListenerDurable"
91+
class_name = "PaymentListener"
9292

93-
# Durable Object migrations.
94-
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#migrations
9593
[[migrations]]
9694
tag = "v1"
97-
new_classes = ["PaymentListenerDurable"]
95+
new_classes = ["PaymentListenerDurable"]
96+
97+
[[migrations]]
98+
tag = "v2"
99+
renamed_classes = [{from = "PaymentListenerDurable", to = "PaymentListener" }]

0 commit comments

Comments
 (0)