feat(payment): sync plans and add coins rules

This commit is contained in:
2026-06-29 14:11:50 +08:00
parent 274fe87ced
commit e372d58b4c
24 changed files with 1099 additions and 224 deletions
+8 -1
View File
@@ -15,7 +15,14 @@ import { Result } from "@/utils";
const paymentRepo: IPaymentRepository = paymentRepository;
export const loadPaymentPlansActor = fromPromise<PaymentPlansResponse>(
export const loadCachedPaymentPlansActor =
fromPromise<PaymentPlansResponse | null>(async () => {
const result = await paymentRepo.getCachedPlans();
if (Result.isErr(result)) throw result.error;
return result.data;
});
export const refreshPaymentPlansActor = fromPromise<PaymentPlansResponse>(
async () => {
const result = await paymentRepo.getPlans();
if (Result.isErr(result)) throw result.error;