MyCrypto/common/libs/transaction.js
William O'Beirne 9b2156ed4f WIP: Generating transaction on Send tab (Pt 1) (#100)
* Generating transaction ,placing into read only textareas.

* Fix async wallet getAddress cases.

* Chain id from network

* remove leftover console log

* Check balance before generating transaction.

* Translate error msgs, check for invalid address.

* Errors for gas limit and gas price issues.
2017-08-11 22:54:10 +01:00

32 lines
524 B
JavaScript

// @flow
export type TransactionWithoutGas = {|
from: string,
to: string,
gasLimit?: string | number,
value: string | number,
data?: string,
chainId?: number
|};
export type Transaction = {|
...TransactionWithoutGas,
gasPrice: string | number
|};
export type RawTransaction = {|
nonce: string,
gasPrice: string,
gasLimit: string,
to: string,
value: string,
data: string,
chainId: number
|};
export type BroadcastTransaction = {|
...RawTransaction,
rawTx: string,
signedTx: string
|};