Skip to content

Commit 051845c

Browse files
committed
Override zcashd's tx fee when sending
Fixes #302
1 parent 1ad6cca commit 051845c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/components/Send.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ const ToAddrBox = ({
170170
);
171171
};
172172

173-
function getSendManyJSON(sendPageState: SendPageState): [] {
173+
function getSendManyJSON(sendPageState: SendPageState, info: Info): [] {
174174
const json = [];
175175
json.push(sendPageState.fromaddr);
176176
json.push(
@@ -185,7 +185,7 @@ function getSendManyJSON(sendPageState: SendPageState): [] {
185185
})
186186
);
187187
json.push(1); // minconf = 1
188-
json.push(Utils.getDefaultFee()); // Control the default fee as well.
188+
json.push(Utils.getDefaultFee(info.latestBlock)); // Control the default fee as well.
189189

190190
console.log('Sending:');
191191
console.log(json);
@@ -246,7 +246,7 @@ const ConfirmModalInternal = ({
246246

247247
// Then send the Tx async
248248
(async () => {
249-
const sendJson = getSendManyJSON(sendPageState);
249+
const sendJson = getSendManyJSON(sendPageState, info);
250250
let success = false;
251251

252252
try {

app/utils/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export default class Utils {
111111
}
112112

113113
static getDefaultFee(height: number): number {
114-
if (height > 1046400) {
114+
if (height >= 1080000) {
115115
return 0.00001;
116116
} else {
117117
return 0.0001;

0 commit comments

Comments
 (0)