mirror of
https://github.com/status-im/liquid-funding.git
synced 2025-02-19 22:58:16 +00:00
only use authorizedPayments for withdraw
This commit is contained in:
parent
6b76e98e78
commit
214de820a2
@ -51,7 +51,7 @@ const TransferDialog = ({ row, handleClose, transferPledgeAmounts }) => (
|
|||||||
setStatus,
|
setStatus,
|
||||||
status
|
status
|
||||||
}) => (
|
}) => (
|
||||||
<form onSubmit={handleSubmit}>
|
<form onSubmit={handleSubmit} autoComplete="off">
|
||||||
<Dialog
|
<Dialog
|
||||||
open={!!row}
|
open={!!row}
|
||||||
onClose={handleClose}
|
onClose={handleClose}
|
||||||
@ -70,7 +70,6 @@ const TransferDialog = ({ row, handleClose, transferPledgeAmounts }) => (
|
|||||||
label="Amount to transfer"
|
label="Amount to transfer"
|
||||||
placeholder="Amount to transfer"
|
placeholder="Amount to transfer"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
type="number"
|
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
fullWidth
|
fullWidth
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
|
@ -65,7 +65,7 @@ class Withdraw extends PureComponent {
|
|||||||
initialValues={{}}
|
initialValues={{}}
|
||||||
onSubmit={async (values, { setSubmitting, resetForm, setStatus }) => {
|
onSubmit={async (values, { setSubmitting, resetForm, setStatus }) => {
|
||||||
const { amount } = values
|
const { amount } = values
|
||||||
const paymentId = authorizedPayments.find(r => r.ref === rowData.id)['idPayment']
|
const paymentId = isPaying ? authorizedPayments.find(r => r.ref === rowData.id)['idPayment'] : rowData.id
|
||||||
const args = isPaying ? [paymentId] : [paymentId, toWei(amount)]
|
const args = isPaying ? [paymentId] : [paymentId, toWei(amount)]
|
||||||
const sendFn = isPaying ? confirmPayment : withdraw
|
const sendFn = isPaying ? confirmPayment : withdraw
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user