Skip to content

Commit

Permalink
Merge pull request #929 from input-output-hk/fix/lw-9936-assets-disap…
Browse files Browse the repository at this point in the history
…pear-from-send-screen

fix: use local variable in prepareTx
  • Loading branch information
lucas-barros committed Mar 5, 2024
2 parents 7bf7ea1 + 5b41265 commit 501e501
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/ui/app/pages/send.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,10 @@ const Send = () => {
_address.error ||
!_address.result ||
(!_value.ada && _value.assets.length <= 0) ||
(address.isM1 &&
(_address.isM1 &&
BigInt(toUnit(_value.ada)) <
BigInt(address.ada.minLovelace) +
BigInt(address.ada.fromADAFeeLovelace))
BigInt(_address.ada.minLovelace) +
BigInt(_address.ada.fromADAFeeLovelace))
) {
setFee({ fee: '0' });
setTx(null);
Expand Down Expand Up @@ -268,14 +268,14 @@ const Send = () => {
_value.personalAda.replace(/[,\s]/g, '')
).toLocaleString('en-EN', { minimumFractionDigits: 6 });
output.amount[0].quantity = toUnit(_value.personalAda || '0');
!focus.current && setValue({ ...value, ada: displayAda });
!focus.current && setValue({ ..._value, ada: displayAda });
} else if (_value.assets.length > 0) {
output.amount[0].quantity = minAda;
const minAdaDisplay = parseFloat(
displayUnit(minAda).toString().replace(/[,\s]/g, '')
).toLocaleString('en-EN', { minimumFractionDigits: 6 });
setValue({
...value,
..._value,
ada: minAdaDisplay,
});
}
Expand Down

0 comments on commit 501e501

Please sign in to comment.