fix select by token address instead of token label

This commit is contained in:
Barry Gitarts 2019-06-19 12:20:48 -04:00
parent 0a80d12402
commit 1bfecd2f3f
1 changed files with 1 additions and 1 deletions

View File

@ -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 {