fix select by token address instead of token label
This commit is contained in:
parent
0a80d12402
commit
1bfecd2f3f
|
@ -30,7 +30,7 @@ function Withdraw({ handleClose, classes, rowData, authorizedPayment }) {
|
||||||
onSubmit={async (values, { setSubmitting: _setSubmitting, resetForm: _resetForm, setStatus: _setStatus }) => {
|
onSubmit={async (values, { setSubmitting: _setSubmitting, resetForm: _resetForm, setStatus: _setStatus }) => {
|
||||||
const { amount } = values
|
const { amount } = values
|
||||||
const paymentId = isPaying ? authorizedPayment[0]['returnValues']['idPayment'] : rowData.idPledge
|
const paymentId = isPaying ? authorizedPayment[0]['returnValues']['idPayment'] : rowData.idPledge
|
||||||
const { chainReadibleFn } = getTokenByAddress(rowData.token)
|
const { chainReadibleFn } = getTokenByAddress(rowData.pledge.token)
|
||||||
const args = isPaying ? [paymentId] : [paymentId, chainReadibleFn(amount)]
|
const args = isPaying ? [paymentId] : [paymentId, chainReadibleFn(amount)]
|
||||||
const sendFn = isPaying ? confirmPayment : withdraw
|
const sendFn = isPaying ? confirmPayment : withdraw
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue