File tree Expand file tree Collapse file tree 5 files changed +16
-2
lines changed Expand file tree Collapse file tree 5 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ function VectorLabelText({ type }: { type: LabelType }) {
6363 if ( type === LabelType . PaymentTransferRemainder || type === LabelType . AssetTransferRemainder ) return < span > Remainder</ span >
6464 if ( type === LabelType . AppCall ) return < span > App Call</ span >
6565 if ( type === LabelType . AppCreate ) return < span > App Create</ span >
66+ if ( type === LabelType . AppUpdate ) return < span > App Update</ span >
6667 if ( type === LabelType . AssetCreate ) return < span > Asset Create</ span >
6768 if ( type === LabelType . AssetReconfigure )
6869 return (
Original file line number Diff line number Diff line change @@ -114,7 +114,12 @@ const getAppCallTransactionRepresentations = (
114114 verticalId : verticals . find ( ( c ) => c . type === 'Application' && transaction . applicationId === c . applicationId ) ?. id ?? - 1 ,
115115 }
116116
117- const type = transaction . subType === AppCallTransactionSubType . Create ? LabelType . AppCreate : LabelType . AppCall
117+ const type =
118+ transaction . subType === AppCallTransactionSubType . Create
119+ ? LabelType . AppCreate
120+ : transaction . subType === AppCallTransactionSubType . Update
121+ ? LabelType . AppUpdate
122+ : LabelType . AppCall
118123 return [ asTransactionGraphRepresentation ( from , to , { type } ) ]
119124}
120125
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ export enum LabelType {
3636 AssetTransferRemainder = 'AssetTransferRemainder' ,
3737 AppCall = 'AppCall' ,
3838 AppCreate = 'AppCreate' ,
39+ AppUpdate = 'AppUpdate' ,
3940 AssetCreate = 'AssetCreate' ,
4041 AssetReconfigure = 'AssetReconfigure' ,
4142 AssetDestroy = 'AssetDestroy' ,
@@ -68,6 +69,7 @@ export type Label =
6869 | { type : LabelType . Clawback ; asset : AsyncMaybeAtom < AssetSummary > ; amount : number | bigint }
6970 | { type : LabelType . AppCall }
7071 | { type : LabelType . AppCreate }
72+ | { type : LabelType . AppUpdate }
7173 | { type : LabelType . AssetCreate }
7274 | { type : LabelType . AssetReconfigure }
7375 | { type : LabelType . AssetDestroy }
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ const mapCommonAppCallTransactionProperties = (
5454 indexPrefix ?: string
5555) => {
5656 invariant ( transactionResult . applicationTransaction , 'application-transaction is not set' )
57+
5758 const isCreate = ! transactionResult . applicationTransaction . applicationId
5859 const onCompletion = asAppCallOnComplete ( transactionResult . applicationTransaction . onCompletion )
5960 const isOpUp =
@@ -68,7 +69,11 @@ const mapCommonAppCallTransactionProperties = (
6869 return {
6970 ...mapCommonTransactionProperties ( transactionResult ) ,
7071 type : TransactionType . AppCall ,
71- subType : isCreate ? AppCallTransactionSubType . Create : undefined ,
72+ subType : isCreate
73+ ? AppCallTransactionSubType . Create
74+ : onCompletion === AppCallOnComplete . Update
75+ ? AppCallTransactionSubType . Update
76+ : undefined ,
7277 isOpUp,
7378 applicationId : transactionResult . applicationTransaction . applicationId
7479 ? transactionResult . applicationTransaction . applicationId
Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ export type LocalStateDelta = RawLocalStateDelta | DecodedLocalStateDelta
160160
161161export enum AppCallTransactionSubType {
162162 Create = 'Create' ,
163+ Update = 'Update' ,
163164}
164165
165166export type BaseAppCallTransaction = CommonTransactionProperties & {
You can’t perform that action at this time.
0 commit comments