@@ -193,7 +193,13 @@ export const TransactionSchema = Type.Object({
193
193
userOpHash : Type . Union ( [ Type . String ( ) , Type . Null ( ) ] ) ,
194
194
functionName : Type . Union ( [ Type . String ( ) , Type . Null ( ) ] ) ,
195
195
functionArgs : Type . Union ( [ Type . String ( ) , Type . Null ( ) ] ) ,
196
+ // @deprecated
196
197
onChainTxStatus : Type . Union ( [ Type . Number ( ) , Type . Null ( ) ] ) ,
198
+ onchainStatus : Type . Union ( [
199
+ Type . Literal ( "success" ) ,
200
+ Type . Literal ( "reverted" ) ,
201
+ Type . Null ( ) ,
202
+ ] ) ,
197
203
effectiveGasPrice : Type . Union ( [
198
204
Type . String ( {
199
205
description : "Effective Gas Price" ,
@@ -228,7 +234,7 @@ export const toTransactionSchema = (
228
234
return null ;
229
235
} ;
230
236
231
- const resolveOnchainStatus = ( ) => {
237
+ const resolveOnchainTxStatus = ( ) => {
232
238
if ( transaction . status === "mined" ) {
233
239
return transaction . onchainStatus === "success" ? 1 : 0 ;
234
240
}
@@ -288,7 +294,9 @@ export const toTransactionSchema = (
288
294
blockNumber :
289
295
"minedAtBlock" in transaction ? Number ( transaction . minedAtBlock ) : null ,
290
296
retryCount : "retryCount" in transaction ? transaction . resendCount : 0 ,
291
- onChainTxStatus : resolveOnchainStatus ( ) ,
297
+ onChainTxStatus : resolveOnchainTxStatus ( ) ,
298
+ onchainStatus :
299
+ "onchainStatus" in transaction ? transaction . onchainStatus : null ,
292
300
effectiveGasPrice :
293
301
"effectiveGasPrice" in transaction && transaction . effectiveGasPrice
294
302
? transaction . effectiveGasPrice . toString ( )
0 commit comments