Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Stake Pre-Splitting #444

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion scripts/wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ export class Wallet {
}

const fee = transactionBuilder.getFee();
const changeValue = transactionBuilder.valueIn - value - fee;
const changeValue = transactionBuilder.valueIn - transactionBuilder.valueOut - fee;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert that value === transcationBuilder.valueOut

if (changeValue < 0) {
if (!subtractFeeFromAmt) {
throw new Error('Not enough balance');
Expand Down
Loading