Skip to content
This repository was archived by the owner on Apr 25, 2024. It is now read-only.

Commit 0884745

Browse files
dylan-thompsonbucko13
authored andcommitted
fix: max spend button
1 parent cd88354 commit 0884745

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/actions/transactionActions.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,12 @@ export function setMaxSpendOnOutput(outputIndex) {
276276
new BigNumber(0)
277277
);
278278

279-
const spendAllAmount = satoshisToBitcoins(
280-
new BigNumber(confirmedBalance)
281-
.minus(outputs.length > 1 ? totalOutputValue : 0)
282-
.minus(estimatedFee)
279+
const spendAllAmount = new BigNumber(
280+
satoshisToBitcoins(
281+
new BigNumber(confirmedBalance)
282+
.minus(outputs.length > 1 ? totalOutputValue : 0)
283+
.minus(estimatedFee)
284+
)
283285
);
284286

285287
if (
@@ -292,7 +294,7 @@ export function setMaxSpendOnOutput(outputIndex) {
292294
"Not enough available funds for max spend. Clear other outputs or wait for incoming deposits to confirm."
293295
)
294296
);
295-
return dispatch(setOutputAmount(outputIndex, spendAllAmount));
297+
return dispatch(setOutputAmount(outputIndex, spendAllAmount.toString()));
296298
};
297299
}
298300

0 commit comments

Comments
 (0)