File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5757 file-coverage-mode : " changes"
5858
5959 - name : Archive production artifacts
60- uses : actions/upload-artifact@v3
60+ uses : actions/upload-artifact@v4
6161 with :
6262 name : dist-without-markdown
6363 path : |
Original file line number Diff line number Diff line change 111111 "stripe" : " ^14.2.0" ,
112112 "worker-auth-providers" : " ^0.0.13-beta.4" ,
113113 "zod" : " ^3.21.4"
114- }
114+ },
115+ "packageManager" : " pnpm@10.9.0+sha512.0486e394640d3c1fb3c9d43d49cf92879ff74f8516959c235308f5a8f62e2e19528a65cdc2a3058f587cde71eba3d5b56327c8c33a97e4c4051ca48a10ca2d5f"
115116}
Original file line number Diff line number Diff line change @@ -30,7 +30,10 @@ export const paymentLogsSchema = pgTable(
3030 withTimezone : true ,
3131 } ) ,
3232 currencyId : text ( "currency_id" ) . notNull ( ) ,
33- originalResponseBlob : jsonb ( "original_response_blob" ) . notNull ( ) ,
33+ originalResponseBlob : jsonb ( "original_response_blob" ) . default ( {
34+ payment_status : "pending" ,
35+ status : "pending" ,
36+ } ) ,
3437 ...createdAndUpdatedAtFields ,
3538 } ,
3639 ( t ) => ( {
Original file line number Diff line number Diff line change @@ -10,6 +10,11 @@ import {
1010 PaymentLogRef ,
1111} from "~/schema/shared/refs" ;
1212
13+ type PaymentResponseBlob = {
14+ payment_status ?: string ;
15+ status ?: string ;
16+ } ;
17+
1318const SearchPaymentLogsInput = builder . inputType ( "SearchPaymentLogsInput" , {
1419 fields : ( t ) => ( {
1520 startDate : t . field ( {
@@ -89,7 +94,12 @@ builder.queryFields((t) => ({
8994
9095 paymentLogs . forEach ( ( p ) => {
9196 const key = `${ p . platform } -${ p . currencyId } ` ;
92- const isPaid = p . originalResponseBlob . payment_status === "paid" || p . originalResponseBlob . status === "approved" ;
97+ const blob = p . originalResponseBlob as
98+ | PaymentResponseBlob
99+ | null
100+ | undefined ;
101+ const isPaid =
102+ blob ?. payment_status === "paid" || blob ?. status === "approved" ;
93103
94104 if ( ! consolidatedPayments [ key ] || ! isPaid ) {
95105 consolidatedPayments [ key ] = {
You can’t perform that action at this time.
0 commit comments