WA-238 Rename transactions form component to AddTRansaction
This commit is contained in:
parent
cbf29c10e0
commit
3268d76dcb
|
@ -5,7 +5,7 @@ import TextField from '~/components/forms/TextField'
|
||||||
import { composeValidators, inLimit, mustBeNumber, required, greaterThan, mustBeEthereumAddress } from '~/components/forms/validator'
|
import { composeValidators, inLimit, mustBeNumber, required, greaterThan, mustBeEthereumAddress } from '~/components/forms/validator'
|
||||||
import Block from '~/components/layout/Block'
|
import Block from '~/components/layout/Block'
|
||||||
import Heading from '~/components/layout/Heading'
|
import Heading from '~/components/layout/Heading'
|
||||||
import { TX_NAME_PARAM, TX_DESTINATION_PARAM, TX_VALUE_PARAM } from '~/routes/safe/component/Transactions/transactions'
|
import { TX_NAME_PARAM, TX_DESTINATION_PARAM, TX_VALUE_PARAM } from '~/routes/safe/component/AddTransaction/transactions'
|
||||||
|
|
||||||
export const CONFIRMATIONS_ERROR = 'Number of confirmations can not be higher than the number of owners'
|
export const CONFIRMATIONS_ERROR = 'Number of confirmations can not be higher than the number of owners'
|
||||||
|
|
|
@ -5,7 +5,7 @@ import Block from '~/components/layout/Block'
|
||||||
import Bold from '~/components/layout/Bold'
|
import Bold from '~/components/layout/Bold'
|
||||||
import Heading from '~/components/layout/Heading'
|
import Heading from '~/components/layout/Heading'
|
||||||
import Paragraph from '~/components/layout/Paragraph'
|
import Paragraph from '~/components/layout/Paragraph'
|
||||||
import { TX_NAME_PARAM, TX_DESTINATION_PARAM, TX_VALUE_PARAM } from '~/routes/safe/component/Transactions/transactions'
|
import { TX_NAME_PARAM, TX_DESTINATION_PARAM, TX_VALUE_PARAM } from '~/routes/safe/component/AddTransaction/transactions'
|
||||||
|
|
||||||
type FormProps = {
|
type FormProps = {
|
||||||
values: Object,
|
values: Object,
|
|
@ -1,6 +1,6 @@
|
||||||
// @flow
|
// @flow
|
||||||
import { List, Map } from 'immutable'
|
import { List, Map } from 'immutable'
|
||||||
import { storeTransaction, buildConfirmationsFrom, EXECUTED_CONFIRMATION_HASH, buildExecutedConfirmationFrom } from '~/routes/safe/component/Transactions/transactions'
|
import { storeTransaction, buildConfirmationsFrom, EXECUTED_CONFIRMATION_HASH, buildExecutedConfirmationFrom } from '~/routes/safe/component/AddTransaction/transactions'
|
||||||
import { type Transaction } from '~/routes/safe/store/model/transaction'
|
import { type Transaction } from '~/routes/safe/store/model/transaction'
|
||||||
import { SafeFactory } from '~/routes/safe/store/test/builder/safe.builder'
|
import { SafeFactory } from '~/routes/safe/store/test/builder/safe.builder'
|
||||||
import { type Safe } from '~/routes/safe/store/model/safe'
|
import { type Safe } from '~/routes/safe/store/model/safe'
|
|
@ -10,7 +10,7 @@ import { type Safe } from '~/routes/safe/store/model/safe'
|
||||||
import List from 'material-ui/List'
|
import List from 'material-ui/List'
|
||||||
|
|
||||||
import Withdrawn from '~/routes/safe/component/Withdrawn'
|
import Withdrawn from '~/routes/safe/component/Withdrawn'
|
||||||
import Transactions from '~/routes/safe/component/Transactions'
|
import AddTransaction from '~/routes/safe/component/AddTransaction'
|
||||||
|
|
||||||
import Address from './Address'
|
import Address from './Address'
|
||||||
import Balance from './Balance'
|
import Balance from './Balance'
|
||||||
|
@ -47,10 +47,12 @@ class GnoSafe extends React.PureComponent<SafeProps, State> {
|
||||||
|
|
||||||
onAddTx = () => {
|
onAddTx = () => {
|
||||||
const { balance, safe } = this.props
|
const { balance, safe } = this.props
|
||||||
this.setState({ component: <Transactions safe={safe} balance={Number(balance)} onReset={this.onSeeTxs} /> })
|
this.setState({
|
||||||
|
component: <AddTransaction safe={safe} balance={Number(balance)} onReset={this.onListTransactions} />,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
onSeeTxs = () => {
|
onListTransactions = () => {
|
||||||
const { safe } = this.props
|
const { safe } = this.props
|
||||||
|
|
||||||
this.setState({ component: <Withdrawn safeAddress={safe.get('address')} dailyLimit={safe.get('dailyLimit')} /> })
|
this.setState({ component: <Withdrawn safeAddress={safe.get('address')} dailyLimit={safe.get('dailyLimit')} /> })
|
||||||
|
@ -69,7 +71,7 @@ class GnoSafe extends React.PureComponent<SafeProps, State> {
|
||||||
<Confirmations confirmations={safe.get('confirmations')} />
|
<Confirmations confirmations={safe.get('confirmations')} />
|
||||||
<Address address={safe.get('address')} />
|
<Address address={safe.get('address')} />
|
||||||
<DailyLimit dailyLimit={safe.get('dailyLimit')} onWithdrawn={this.onWithdrawn} />
|
<DailyLimit dailyLimit={safe.get('dailyLimit')} onWithdrawn={this.onWithdrawn} />
|
||||||
<MultisigTx balance={balance} onAddTx={this.onAddTx} onSeeTxs={this.onSeeTxs} />
|
<MultisigTx balance={balance} onAddTx={this.onAddTx} onSeeTxs={this.onListTransactions} />
|
||||||
</List>
|
</List>
|
||||||
</Col>
|
</Col>
|
||||||
<Col sm={12} center="xs" md={7} margin="xl" layout="column">
|
<Col sm={12} center="xs" md={7} margin="xl" layout="column">
|
||||||
|
|
Loading…
Reference in New Issue