mirror of
https://github.com/status-im/liquid-funding.git
synced 2025-01-11 12:04:21 +00:00
Added gas estimation for transaction on Transfer Dialog
This commit is contained in:
parent
bdf4c373f8
commit
12f685bfb5
@ -21,8 +21,11 @@ const TransferDialog = ({ row, handleClose, transferPledgeAmounts }) => (
|
||||
const { id } = row
|
||||
const { idSender, amount, idReceiver } = values
|
||||
const args = [idSender, id, toWei(amount.toString()), idReceiver]
|
||||
transfer(...args)
|
||||
.send()
|
||||
|
||||
const toSend = transfer(...args);
|
||||
const estimatedGas = await toSend.estimateGas();
|
||||
|
||||
toSend.send({gas: estimatedGas + 1000})
|
||||
.then(res => {
|
||||
console.log({res})
|
||||
const { events: { Transfer: { returnValues } } } = res
|
||||
|
Loading…
x
Reference in New Issue
Block a user