William O'Beirne db6b737cad Show Recent Txs on Check Tx Page (#1147)
* 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
2018-03-14 15:10:14 -05:00

29 lines
1003 B
TypeScript

import { Wei, TokenValue } from 'libs/units';
import { IHexStrTransaction } from 'libs/transaction';
import { Token } from 'types/network';
import { TransactionData, TransactionReceipt } from 'types/transactions';
export interface TxObj {
to: string;
data: string;
}
interface TokenBalanceResult {
balance: TokenValue;
error: string | null;
}
export interface INode {
ping(): Promise<boolean>;
getBalance(address: string): Promise<Wei>;
getTokenBalance(address: string, token: Token): Promise<TokenBalanceResult>;
getTokenBalances(address: string, tokens: Token[]): Promise<TokenBalanceResult[]>;
estimateGas(tx: Partial<IHexStrTransaction>): Promise<Wei>;
getTransactionCount(address: string): Promise<string>;
getTransactionByHash(txhash: string): Promise<TransactionData>;
getTransactionReceipt(txhash: string): Promise<TransactionReceipt>;
sendRawTx(tx: string): Promise<string>;
sendCallRequest(txObj: TxObj): Promise<string>;
getCurrentBlock(): Promise<string>;
}