mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-09 18:45:38 +00:00
db6b737cad
* Save transactions to local storage. * Checksum more things + reset hash on network change. * Fix IHexTransaction type, grab from from tx object directly. * Refactor storage of recent transactions to use redux storage and loading. * Refactor types to a transactions types file. * Initial crack at recent transactions tab on account * Punctuation. * Transaction Status responsive behavior. * Refactor transaction helper function out to remove circular dependency. * Fix typings * Collapse subtabs to select list when too small. * s/wallet/address * Type select onChange * Get fields from current state if web3 tx
45 lines
853 B
TypeScript
45 lines
853 B
TypeScript
import { Wei } from 'libs/units';
|
|
|
|
export interface SavedTransaction {
|
|
hash: string;
|
|
to: string;
|
|
from: string;
|
|
value: string;
|
|
chainId: number;
|
|
time: number;
|
|
}
|
|
|
|
export interface TransactionData {
|
|
hash: string;
|
|
nonce: number;
|
|
blockHash: string | null;
|
|
blockNumber: number | null;
|
|
transactionIndex: number | null;
|
|
from: string;
|
|
to: string;
|
|
value: Wei;
|
|
gasPrice: Wei;
|
|
gas: Wei;
|
|
input: string;
|
|
}
|
|
|
|
export interface TransactionReceipt {
|
|
transactionHash: string;
|
|
transactionIndex: number;
|
|
blockHash: string;
|
|
blockNumber: number;
|
|
cumulativeGasUsed: Wei;
|
|
gasUsed: Wei;
|
|
contractAddress: string | null;
|
|
logs: string[];
|
|
logsBloom: string;
|
|
status: number;
|
|
}
|
|
|
|
export interface TransactionState {
|
|
data: TransactionData | null;
|
|
receipt: TransactionReceipt | null;
|
|
error: string | null;
|
|
isLoading: boolean;
|
|
}
|