Pass "maxFeePerGas" to the <GasTiming> component from Swaps (#11684)

feature/default_network_editable
Daniel 3 years ago committed by GitHub
parent 66eb4fb5a0
commit 24f5cc009b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      ui/pages/swaps/fee-card/fee-card.js
  2. 1
      ui/pages/swaps/fee-card/fee-card.test.js
  3. 1
      ui/pages/swaps/view-quote/view-quote.js

@ -39,6 +39,7 @@ export default function FeeCard({
chainId,
EIP1559Network,
maxPriorityFeePerGasDecGWEI,
maxFeePerGasDecGWEI,
}) {
const t = useContext(I18nContext);
@ -143,6 +144,7 @@ export default function FeeCard({
subTitle={
<GasTiming
maxPriorityFeePerGas={maxPriorityFeePerGasDecGWEI}
maxFeePerGas={maxFeePerGasDecGWEI}
/>
}
subText={
@ -304,4 +306,5 @@ FeeCard.propTypes = {
chainId: PropTypes.string.isRequired,
EIP1559Network: PropTypes.bool.isRequired,
maxPriorityFeePerGasDecGWEI: PropTypes.string,
maxFeePerGasDecGWEI: PropTypes.string,
};

@ -86,6 +86,7 @@ describe('FeeCard', () => {
const props = createProps({
EIP1559Network: true,
maxPriorityFeePerGasDecGWEI: '3',
maxFeePerGasDecGWEI: '4',
});
const { getByText } = renderWithProvider(<FeeCard {...props} />, store);
expect(getByText('Using the best quote')).toBeInTheDocument();

@ -754,6 +754,7 @@ export default function ViewQuote() {
chainId={chainId}
EIP1559Network={EIP1559Network}
maxPriorityFeePerGasDecGWEI={hexWEIToDecGWEI(maxPriorityFeePerGas)}
maxFeePerGasDecGWEI={hexWEIToDecGWEI(maxFeePerGas)}
/>
</div>
</div>

Loading…
Cancel
Save