From 8cfc759a450479cf3dd39e224b104133cdd9b660 Mon Sep 17 00:00:00 2001 From: ponyjackal Date: Fri, 1 Dec 2023 11:47:29 -0800 Subject: [PATCH 1/2] feat: extract contextAction in new file --- src/types/contextAction.ts | 52 +++++++++++++++++++++++++++++++++++ src/types/index.ts | 1 + src/types/transaction.ts | 55 ++------------------------------------ 3 files changed, 55 insertions(+), 53 deletions(-) create mode 100644 src/types/contextAction.ts diff --git a/src/types/contextAction.ts b/src/types/contextAction.ts new file mode 100644 index 00000000..38c8e314 --- /dev/null +++ b/src/types/contextAction.ts @@ -0,0 +1,52 @@ +export type ContextAction = + | 'bought' + | 'bridged' + | 'deployed' + | 'minted' + | 'swapped' + | 'sent' + | 'received' + | 'committed to' + | 'received airdrop' + | 'gave access to' + | 'interacted with' + | 'sent message' + // WETH + | 'wrapped' + | 'unwrapped' + // ENS + | 'registered' + | 'renewed' + | 'set reverse ens to' + // CryptoPunks + | 'minted punk' + | 'listed punk' + | 'withdrew bid for' + | 'bid on punk' + | 'withdrew from contract' + | 'bought punk' + | 'transferred punk' + | 'unlisted punk' + // Leeroy + | 'tipped' + | 'updated user details' + | 'replied to' + | 'reposted' + | 'registered username' + | 'followed' + | 'unfollowed' + | 'posted' + // fren.pet + | 'set pet name' + | 'bought accessory' + | 'attacked' + | 'redeemed' + | 'bonk revealed' + | 'wheel revealed' + | 'wheel committed' + | 'killed' + | 'minted' + | 'redeemed' + | 'sold item' + | 'joined dice game' + | 'dice game settled'; diff --git a/src/types/index.ts b/src/types/index.ts index f861bad5..170b6ed0 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1,2 +1,3 @@ export * from './transaction'; export * from './log'; +export * from './ContextAction'; diff --git a/src/types/transaction.ts b/src/types/transaction.ts index 3f143f00..0095f9f0 100644 --- a/src/types/transaction.ts +++ b/src/types/transaction.ts @@ -1,4 +1,6 @@ import { Log } from './log'; +import { ContextAction } from './contextAction'; + export interface AssetTransfer { asset?: string; from: string; @@ -104,59 +106,6 @@ export type TransactionContextType = { crossChainTx?: Transaction[]; }; -export type ContextAction = - | 'bought' - | 'bridged' - | 'deployed' - | 'minted' - | 'swapped' - | 'sent' - | 'received' - | 'committed to' - | 'received airdrop' - | 'gave access to' - | 'interacted with' - | 'sent message' - // WETH - | 'wrapped' - | 'unwrapped' - // ENS - | 'registered' - | 'renewed' - | 'set reverse ens to' - // CryptoPunks - | 'minted punk' - | 'listed punk' - | 'withdrew bid for' - | 'bid on punk' - | 'withdrew from contract' - | 'bought punk' - | 'transferred punk' - | 'unlisted punk' - // Leeroy - | 'tipped' - | 'updated user details' - | 'replied to' - | 'reposted' - | 'registered username' - | 'followed' - | 'unfollowed' - | 'posted' - // fren.pet - | 'set pet name' - | 'bought accessory' - | 'attacked' - | 'redeemed' - | 'bonk revealed' - | 'wheel revealed' - | 'wheel committed' - | 'killed' - | 'minted' - | 'redeemed' - | 'sold item' - | 'joined dice game' - | 'dice game settled'; - export type ContextSummaryVariableType = | string | { From ffb26378406dddd8242c66392c18072630fd0ca1 Mon Sep 17 00:00:00 2001 From: ponyjackal Date: Fri, 1 Dec 2023 11:50:36 -0800 Subject: [PATCH 2/2] fix: contextACtion import --- src/types/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/index.ts b/src/types/index.ts index 170b6ed0..384a9b87 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1,3 +1,3 @@ export * from './transaction'; export * from './log'; -export * from './ContextAction'; +export * from './contextAction';