From 60b596c0c48744e4539b561a72d7f1d3975e2e0d Mon Sep 17 00:00:00 2001 From: envin Date: Thu, 19 Sep 2024 19:50:47 +0200 Subject: [PATCH] fix(withwithdrawInflationToRecipient): fix script generation --- src/utils/presets/utils.js | 2 +- src/utils/presets/withdrawInflationToRecipient.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils/presets/utils.js b/src/utils/presets/utils.js index f88b7ef..e9b0a72 100644 --- a/src/utils/presets/utils.js +++ b/src/utils/presets/utils.js @@ -76,7 +76,7 @@ export const prepareTransfer = (tokenAddress, receiverAddress, rawAmount) => [ export const prepareInflationProposal = async (ethPNTAddress, receiverAddress, rawAmount) => { return _.flattenDeep([ - prepareWithdrawInflation(ethPNTAddress, receiverAddress), + prepareWithdrawInflation(ethPNTAddress, rawAmount), prepareTransfer(ethPNTAddress, receiverAddress, rawAmount) ]) } diff --git a/src/utils/presets/withdrawInflationToRecipient.js b/src/utils/presets/withdrawInflationToRecipient.js index 146abce..8a26f67 100644 --- a/src/utils/presets/withdrawInflationToRecipient.js +++ b/src/utils/presets/withdrawInflationToRecipient.js @@ -16,11 +16,11 @@ const withdrawInflationToRecipient = ({ presetParams, setPresetParams }) => ({ fontSize: 15 }, placeholder: 'Receiver address ...', - value: presetParams[1] || '', + value: presetParams[0] || '', onChange: (_e) => setPresetParams({ ...presetParams, - 1: _e.target.value + 0: _e.target.value }) } }, @@ -34,11 +34,11 @@ const withdrawInflationToRecipient = ({ presetParams, setPresetParams }) => ({ fontSize: 15 }, placeholder: 'Amount ...', - value: presetParams[2] || '', + value: presetParams[1] || '', onChange: (_e) => setPresetParams({ ...presetParams, - 2: _e.target.value + 1: _e.target.value }) } }