Fix fee estmation
This commit is contained in:
parent
e68bba1dc6
commit
aad06cdde0
2 changed files with 5 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
// @flow
|
// @flow
|
||||||
import { MINIMUM_PUBLISH_BID } from 'constants/claim';
|
import { MINIMUM_PUBLISH_BID, ESTIMATED_FEE } from 'constants/claim';
|
||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { FormField } from 'component/common/form';
|
import { FormField } from 'component/common/form';
|
||||||
import BidHelpText from './bid-help-text';
|
import BidHelpText from './bid-help-text';
|
||||||
|
@ -34,7 +34,7 @@ function PublishName(props: Props) {
|
||||||
bidError = __('Deposit cannot be higher than your available balance: %balance%', {
|
bidError = __('Deposit cannot be higher than your available balance: %balance%', {
|
||||||
balance: totalAvailableBidAmount,
|
balance: totalAvailableBidAmount,
|
||||||
});
|
});
|
||||||
} else if (totalAvailableBidAmount <= bid + 0.05) {
|
} else if (totalAvailableBidAmount - bid < ESTIMATED_FEE) {
|
||||||
bidError = __('Please decrease your deposit to account for transaction fees or acquire more LBRY Credits.');
|
bidError = __('Please decrease your deposit to account for transaction fees or acquire more LBRY Credits.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,8 +56,8 @@ function PublishName(props: Props) {
|
||||||
value={bid}
|
value={bid}
|
||||||
error={bidError}
|
error={bidError}
|
||||||
disabled={!name}
|
disabled={!name}
|
||||||
onChange={event => updatePublishForm({ bid: parseFloat(event.target.value) })}
|
onChange={(event) => updatePublishForm({ bid: parseFloat(event.target.value) })}
|
||||||
onWheel={e => e.stopPropagation()}
|
onWheel={(e) => e.stopPropagation()}
|
||||||
helper={
|
helper={
|
||||||
<>
|
<>
|
||||||
<BidHelpText
|
<BidHelpText
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// @flow
|
// @flow
|
||||||
export const MINIMUM_PUBLISH_BID = 0.0001;
|
export const MINIMUM_PUBLISH_BID = 0.0001;
|
||||||
export const ESTIMATED_FEE = 0.048; // .001 + .001 | .048 + .048 = .1
|
export const ESTIMATED_FEE = 0.0015;
|
||||||
|
|
||||||
export const MY_CLAIMS_PAGE_SIZE = 10;
|
export const MY_CLAIMS_PAGE_SIZE = 10;
|
||||||
export const PAGE_PARAM = 'page';
|
export const PAGE_PARAM = 'page';
|
||||||
|
|
Loading…
Reference in a new issue