You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am building a transaction with the sole purpose of withdrawing rewards:
const blaze = await getBlazeProvider();
const tx = blaze.newTransaction();
// Assume there is an assert to make sure there are rewards.
tx.addWithdrawal(RewardAccount(account.rewardAddr), delegation.rewards);
tx.setValidUntil(protocolParameters.slot + TX.invalid_hereafter);
const changeAddress = Address.fromBech32(account.paymentAddr);
tx.setChangeAddress(changeAddress);
const result = await tx.complete();
This results in an error if rewards are enough to cover the fees + minUtxoValue for change output as the transaction doesn't have any inputs. It has an easy fix/workaround (manually specifying an input to be spent etc), but I would expect the tx builder to sort this kind of things for me automatically. I.E if no inputs are required to balance outputs + fee (and no extra inputs are manually specified), pick one input anyways either randomly or following some simple preference heuristic
The text was updated successfully, but these errors were encountered:
Hi, I am building a transaction with the sole purpose of withdrawing rewards:
This results in an error if rewards are enough to cover the fees + minUtxoValue for change output as the transaction doesn't have any inputs. It has an easy fix/workaround (manually specifying an input to be spent etc), but I would expect the tx builder to sort this kind of things for me automatically. I.E if no inputs are required to balance outputs + fee (and no extra inputs are manually specified), pick one input anyways either randomly or following some simple preference heuristic
The text was updated successfully, but these errors were encountered: