Skip to content

Commit

Permalink
Override zcashd's tx fee when sending
Browse files Browse the repository at this point in the history
Fixes #302
  • Loading branch information
adityapk00 committed Nov 21, 2020
1 parent 1ad6cca commit 051845c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/components/Send.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ const ToAddrBox = ({
);
};

function getSendManyJSON(sendPageState: SendPageState): [] {
function getSendManyJSON(sendPageState: SendPageState, info: Info): [] {
const json = [];
json.push(sendPageState.fromaddr);
json.push(
Expand All @@ -185,7 +185,7 @@ function getSendManyJSON(sendPageState: SendPageState): [] {
})
);
json.push(1); // minconf = 1
json.push(Utils.getDefaultFee()); // Control the default fee as well.
json.push(Utils.getDefaultFee(info.latestBlock)); // Control the default fee as well.

console.log('Sending:');
console.log(json);
Expand Down Expand Up @@ -246,7 +246,7 @@ const ConfirmModalInternal = ({

// Then send the Tx async
(async () => {
const sendJson = getSendManyJSON(sendPageState);
const sendJson = getSendManyJSON(sendPageState, info);
let success = false;

try {
Expand Down
2 changes: 1 addition & 1 deletion app/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default class Utils {
}

static getDefaultFee(height: number): number {
if (height > 1046400) {
if (height >= 1080000) {
return 0.00001;
} else {
return 0.0001;
Expand Down

0 comments on commit 051845c

Please sign in to comment.