mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-02-07 08:43:43 +00:00
* Change navigator.onLine to actually pinging the network. Refactor notifications to take Infinity instead of 'infinity' * Stop polling when forced offline. * Show spinners if unit display balance is null, show offline text if were actually offline. * Fix issue with typescript and connected union-prop components. * Only ping the node when navigator.onLine changes.
20 lines
687 B
TypeScript
20 lines
687 B
TypeScript
import { Token } from 'config/data';
|
|
import { TransactionWithoutGas } from 'libs/messages';
|
|
import { Wei, TokenValue } from 'libs/units';
|
|
|
|
export interface TxObj {
|
|
to: string;
|
|
data: string;
|
|
}
|
|
export interface INode {
|
|
ping(): Promise<boolean>;
|
|
getBalance(address: string): Promise<Wei>;
|
|
getTokenBalance(address: string, token: Token): Promise<TokenValue>;
|
|
getTokenBalances(address: string, tokens: Token[]): Promise<TokenValue[]>;
|
|
estimateGas(tx: TransactionWithoutGas): Promise<Wei>;
|
|
getTransactionCount(address: string): Promise<string>;
|
|
sendRawTx(tx: string): Promise<string>;
|
|
sendCallRequest(txObj: TxObj): Promise<string>;
|
|
getCurrentBlock(): Promise<string>;
|
|
}
|