add modify safe settings type
This commit is contained in:
parent
9b709f8e29
commit
9a999fd2ea
|
@ -56,12 +56,12 @@ const ThresholdForm = ({
|
||||||
<Block className={classes.formContainer}>
|
<Block className={classes.formContainer}>
|
||||||
<Row>
|
<Row>
|
||||||
<Paragraph weight="bolder" className={classes.headingText}>
|
<Paragraph weight="bolder" className={classes.headingText}>
|
||||||
Set the required owner confirmations:
|
Set the required owner confirmations:
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Row>
|
</Row>
|
||||||
<Row>
|
<Row>
|
||||||
<Paragraph weight="bolder">
|
<Paragraph weight="bolder">
|
||||||
Any transaction over any daily limit requires the confirmation of:
|
Any transaction over any daily limit requires the confirmation of:
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Row>
|
</Row>
|
||||||
<Row margin="xl" align="center" className={classes.inputRow}>
|
<Row margin="xl" align="center" className={classes.inputRow}>
|
||||||
|
@ -90,7 +90,7 @@ const ThresholdForm = ({
|
||||||
</Col>
|
</Col>
|
||||||
<Col xs={10}>
|
<Col xs={10}>
|
||||||
<Paragraph size="lg" color="primary" noMargin className={classes.ownersText}>
|
<Paragraph size="lg" color="primary" noMargin className={classes.ownersText}>
|
||||||
out of
|
out of
|
||||||
{' '}
|
{' '}
|
||||||
{owners.size + 1}
|
{owners.size + 1}
|
||||||
{' '}
|
{' '}
|
||||||
|
@ -102,7 +102,7 @@ owner(s)
|
||||||
<Hairline />
|
<Hairline />
|
||||||
<Row align="center" className={classes.buttonRow}>
|
<Row align="center" className={classes.buttonRow}>
|
||||||
<Button className={classes.button} minWidth={140} onClick={onClickBack}>
|
<Button className={classes.button} minWidth={140} onClick={onClickBack}>
|
||||||
Back
|
Back
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
|
@ -112,7 +112,7 @@ owner(s)
|
||||||
color="primary"
|
color="primary"
|
||||||
testId={ADD_OWNER_THRESHOLD_NEXT_BTN_TESTID}
|
testId={ADD_OWNER_THRESHOLD_NEXT_BTN_TESTID}
|
||||||
>
|
>
|
||||||
Review
|
Review
|
||||||
</Button>
|
</Button>
|
||||||
</Row>
|
</Row>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
|
|
|
@ -27,6 +27,9 @@ const getTxData = (tx: Transaction) => {
|
||||||
} else if (Number(tx.value) > 0) {
|
} else if (Number(tx.value) > 0) {
|
||||||
txData.recipient = tx.recipient
|
txData.recipient = tx.recipient
|
||||||
txData.value = fromWei(toBN(tx.value), 'ether')
|
txData.value = fromWei(toBN(tx.value), 'ether')
|
||||||
|
} else if (tx.modifySettingsTx) {
|
||||||
|
txData.recipient = tx.recipient
|
||||||
|
txData.modifySettingsTx = true
|
||||||
}
|
}
|
||||||
|
|
||||||
return txData
|
return txData
|
||||||
|
@ -44,25 +47,31 @@ type Props = {
|
||||||
}
|
}
|
||||||
|
|
||||||
const TxDescription = ({ tx, classes }: Props) => {
|
const TxDescription = ({ tx, classes }: Props) => {
|
||||||
const { recipient, value } = getTxData(tx)
|
const { recipient, value, modifySettingsTx } = getTxData(tx)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Block className={classes.txDataContainer}>
|
<Block className={classes.txDataContainer}>
|
||||||
<Paragraph noMargin>
|
<Paragraph noMargin>
|
||||||
<Bold>
|
{modifySettingsTx ? (
|
||||||
Send
|
<Bold>Modify Safe Settings</Bold>
|
||||||
{' '}
|
) : (
|
||||||
{value}
|
<>
|
||||||
{' '}
|
<Bold>
|
||||||
{tx.symbol}
|
Send
|
||||||
{' '}
|
{' '}
|
||||||
to:
|
{value}
|
||||||
</Bold>
|
{' '}
|
||||||
<br />
|
{tx.symbol}
|
||||||
<a href={getEtherScanLink(recipient, 'rinkeby')} target="_blank" rel="noopener noreferrer">
|
{' '}
|
||||||
{shortVersionOf(recipient, 4)}
|
to:
|
||||||
<OpenInNew style={openIconStyle} />
|
</Bold>
|
||||||
</a>
|
<br />
|
||||||
|
<a href={getEtherScanLink(recipient, 'rinkeby')} target="_blank" rel="noopener noreferrer">
|
||||||
|
{shortVersionOf(recipient, 4)}
|
||||||
|
<OpenInNew style={openIconStyle} />
|
||||||
|
</a>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
</Block>
|
</Block>
|
||||||
)
|
)
|
||||||
|
|
|
@ -46,10 +46,9 @@ export const getTxTableData = (transactions: List<Transaction>): List<Transactio
|
||||||
const rows = transactions.map((tx: Transaction) => {
|
const rows = transactions.map((tx: Transaction) => {
|
||||||
const txDate = tx.isExecuted ? tx.executionDate : tx.submissionDate
|
const txDate = tx.isExecuted ? tx.executionDate : tx.submissionDate
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
[TX_TABLE_NONCE_ID]: tx.nonce,
|
[TX_TABLE_NONCE_ID]: tx.nonce,
|
||||||
[TX_TABLE_TYPE_ID]: 'Outgoing transfer',
|
[TX_TABLE_TYPE_ID]: tx.modifySettingsTx ? 'Modify Safe Settings' : 'Outgoing transfer',
|
||||||
[TX_TABLE_DATE_ID]: formatDate(tx.isExecuted ? tx.executionDate : tx.submissionDate),
|
[TX_TABLE_DATE_ID]: formatDate(tx.isExecuted ? tx.executionDate : tx.submissionDate),
|
||||||
[buildOrderFieldFrom(TX_TABLE_DATE_ID)]: getTime(txDate),
|
[buildOrderFieldFrom(TX_TABLE_DATE_ID)]: getTime(txDate),
|
||||||
[TX_TABLE_AMOUNT_ID]: getTxAmount(tx),
|
[TX_TABLE_AMOUNT_ID]: getTxAmount(tx),
|
||||||
|
@ -77,7 +76,7 @@ export const generateColumns = () => {
|
||||||
disablePadding: false,
|
disablePadding: false,
|
||||||
label: 'Type',
|
label: 'Type',
|
||||||
custom: false,
|
custom: false,
|
||||||
width: 150,
|
width: 200,
|
||||||
}
|
}
|
||||||
|
|
||||||
const valueColumn: Column = {
|
const valueColumn: Column = {
|
||||||
|
|
|
@ -90,6 +90,7 @@ const buildTransactionFrom = async (safeAddress: string, tx: TxServiceModel, saf
|
||||||
creationTxHash,
|
creationTxHash,
|
||||||
isTokenTransfer,
|
isTokenTransfer,
|
||||||
decodedParams,
|
decodedParams,
|
||||||
|
modifySettingsTx: tx.to === safeAddress,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ export type TransactionProps = {
|
||||||
submissionDate: Date,
|
submissionDate: Date,
|
||||||
executionDate: Date,
|
executionDate: Date,
|
||||||
symbol: string,
|
symbol: string,
|
||||||
|
modifySettingsTx: boolean,
|
||||||
creationTxHash: string,
|
creationTxHash: string,
|
||||||
executionTxHash?: string,
|
executionTxHash?: string,
|
||||||
cancelled?: boolean,
|
cancelled?: boolean,
|
||||||
|
@ -38,6 +39,7 @@ export const makeTransaction: RecordFactory<TransactionProps> = Record({
|
||||||
executionTxHash: undefined,
|
executionTxHash: undefined,
|
||||||
creationTxHash: '',
|
creationTxHash: '',
|
||||||
cancelled: false,
|
cancelled: false,
|
||||||
|
modifySettingsTx: false,
|
||||||
status: 'awaiting',
|
status: 'awaiting',
|
||||||
isTokenTransfer: false,
|
isTokenTransfer: false,
|
||||||
decodedParams: {},
|
decodedParams: {},
|
||||||
|
|
Loading…
Reference in New Issue