uniswap-interface-uncensored/src/state/transactions/actions.ts

34 lines
931 B
TypeScript
Raw Normal View History

import { createAction } from '@reduxjs/toolkit'
export interface SerializableTransactionReceipt {
to: string
from: string
contractAddress: string
transactionIndex: number
blockHash: string
transactionHash: string
blockNumber: number
status?: number
}
2021-05-21 04:14:55 +03:00
export const addTransaction =
createAction<{
chainId: number
hash: string
from: string
approval?: { tokenAddress: string; spender: string }
claim?: { recipient: string }
summary?: string
}>('transactions/addTransaction')
2021-05-20 19:21:40 +03:00
export const clearAllTransactions = createAction<{ chainId: number }>('transactions/clearAllTransactions')
export const finalizeTransaction = createAction<{
2021-05-20 19:21:40 +03:00
chainId: number
hash: string
receipt: SerializableTransactionReceipt
}>('transactions/finalizeTransaction')
export const checkedTransaction = createAction<{
2021-05-20 19:21:40 +03:00
chainId: number
hash: string
blockNumber: number
}>('transactions/checkedTransaction')