fix(fee): Allowing tx fee assigned with env var

This commit is contained in:
Chris Troutner
2020-11-20 20:11:22 -08:00
parent f7086c1f41
commit bb29225376
2 changed files with 17 additions and 11 deletions
+11 -11
View File
@@ -60,18 +60,18 @@ class AdminLTEPage extends React.Component {
<AdminLTE
title={[siteConfig.title]}
titleShort={[siteConfig.titleShort]}
theme="blue"
theme='blue'
>
<Sidebar.Core>
<Item key="Balance" text="Balance" icon={siteConfig.balanceIcon}>
<Item key='Balance' text='Balance' icon={siteConfig.balanceIcon}>
<Box
className="hover-shadow border-none background-none"
className='hover-shadow border-none background-none'
loaded={!_this.state.inFetch}
>
<div className="sidebar-balance">
<div className='sidebar-balance'>
<div>
{!_this.state.inFetch && (
<div className="siderbar-balance-content">
<div className='siderbar-balance-content'>
<span>
<h3>{siteConfig.balanceText}</h3>
@@ -81,9 +81,9 @@ class AdminLTEPage extends React.Component {
<small>USD: ${_this.state.usdBalance}</small>
</span>
<FontAwesomeIcon
className="ml-1 icon"
size="lg"
icon="redo"
className='ml-1 icon'
size='lg'
icon='redo'
onClick={_this.handleGetBalance}
/>
</div>
@@ -101,8 +101,8 @@ class AdminLTEPage extends React.Component {
<Navbar.Core>
<VersionStatus />
</Navbar.Core>
<Layout path="/">
<div className="components-container">
<Layout path='/'>
<div className='components-container'>
{_this.renderNewViewItems(_this.props)}
</div>
</Layout>
@@ -363,7 +363,7 @@ class AdminLTEPage extends React.Component {
return (
<li style={{ display: 'none' }}>
{/* Adding this childrens prevents console errors */}
<a href="#">
<a href='#'>
<span />
<span />
</a>
+6
View File
@@ -78,6 +78,12 @@ const instanceWallet = () => {
if (restURL) {
bchjsOptions.restURL = restURL
}
// Assign the tx fee based on environment variable
const FEE = process.env.FEE ? process.env.FEE : 1
bchjsOptions.fee = FEE
console.log(`Using ${bchjsOptions.fee} sats per byte for tx fees.`)
const bchWalletLib = new BchWallet(localStorageInfo.mnemonic, bchjsOptions)
// Update bchjs instances of minimal-slp-wallet libraries