Skip to content

Commit

Permalink
Merge branch 'develop' into Icon-Component-Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettbear authored May 25, 2023
2 parents 45aea13 + e1b1227 commit 741c35f
Show file tree
Hide file tree
Showing 25 changed files with 19 additions and 97 deletions.
4 changes: 0 additions & 4 deletions app/_locales/de/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions app/_locales/el/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions app/_locales/en/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions app/_locales/es/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions app/_locales/es_419/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions app/_locales/fr/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions app/_locales/hi/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions app/_locales/id/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions app/_locales/ja/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions app/_locales/ko/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions app/_locales/pt/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions app/_locales/pt_BR/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions app/_locales/ru/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions app/_locales/tl/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions app/_locales/tr/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions app/_locales/vi/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions app/_locales/zh_CN/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions ui/ducks/swaps/swaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ const slice = createSlice({
setCurrentSmartTransactionsError: (state, action) => {
const errorType = Object.values(StxErrorTypes).includes(action.payload)
? action.payload
: StxErrorTypes.UNAVAILABLE;
: StxErrorTypes.unavailable;
state.currentSmartTransactionsError = errorType;
},
setSwapsSTXSubmitLoading: (state, action) => {
Expand Down Expand Up @@ -554,7 +554,7 @@ const disableStxIfRegularTxInProgress = (dispatch, transactions) => {
for (const transaction of transactions) {
if (IN_PROGRESS_TRANSACTION_STATUSES.includes(transaction.status)) {
dispatch(
setCurrentSmartTransactionsError(StxErrorTypes.REGULAR_TX_IN_PROGRESS),
setCurrentSmartTransactionsError(StxErrorTypes.regularTxPending),
);
break;
}
Expand Down Expand Up @@ -939,7 +939,7 @@ export const signAndSendSwapsSmartTransaction = ({
if (!fees) {
log.error('"fetchSwapsSmartTransactionFees" failed');
dispatch(setSwapsSTXSubmitLoading(false));
dispatch(setCurrentSmartTransactionsError(StxErrorTypes.UNAVAILABLE));
dispatch(setCurrentSmartTransactionsError(StxErrorTypes.unavailable));
return;
}
if (approveTxParams) {
Expand Down Expand Up @@ -1329,7 +1329,7 @@ export function fetchSwapsSmartTransactionFees({
const errorObj = parseSmartTransactionsError(e.message);
if (
fallbackOnNotEnoughFunds ||
errorObj?.error !== StxErrorTypes.NOT_ENOUGH_FUNDS
errorObj?.error !== StxErrorTypes.notEnoughFunds
) {
dispatch(setCurrentSmartTransactionsError(errorObj?.error));
}
Expand Down
2 changes: 1 addition & 1 deletion ui/pages/swaps/awaiting-signatures/awaiting-signatures.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default function AwaitingSignatures() {
</Text>
{needsTwoConfirmations && (
<>
<Text variant={TextVariant.bodyMdBold} boxProps={{ marginTop: 2 }}>
<Text variant={TextVariant.bodyMdBold} marginTop={2}>
{t('swapToConfirmWithHwWallet')}
</Text>
<ul className="awaiting-signatures__steps">
Expand Down
6 changes: 1 addition & 5 deletions ui/pages/swaps/fee-card/fee-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export default function FeeCard({
numberOfQuotes,
onQuotesClick,
chainId,
isBestQuote,
}) {
const t = useContext(I18nContext);
const useCurrencyRateCheck = useSelector(getUseCurrencyRateCheck);
Expand Down Expand Up @@ -167,9 +166,7 @@ export default function FeeCard({
onClick={onQuotesClick}
className="fee-card__quote-link-text"
>
{isBestQuote
? t('swapBestOfNQuotes', [numberOfQuotes])
: t('swapNQuotesWithDot', [numberOfQuotes])}
{t('swapNQuotesWithDot', [numberOfQuotes])}
</span>
)}
{t('swapIncludesMMFee', [metaMaskFee])}
Expand Down Expand Up @@ -202,5 +199,4 @@ FeeCard.propTypes = {
onQuotesClick: PropTypes.func.isRequired,
numberOfQuotes: PropTypes.number.isRequired,
chainId: PropTypes.string.isRequired,
isBestQuote: PropTypes.bool,
};
1 change: 0 additions & 1 deletion ui/pages/swaps/fee-card/fee-card.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ export default {
metaMaskFee: '0.875',
numberOfQuotes: 6,
chainId: CHAIN_IDS.MAINNET,
isBestQuote: true,
},
};

Expand Down
6 changes: 3 additions & 3 deletions ui/pages/swaps/fee-card/fee-card.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe('FeeCard', () => {
useSelector.mockImplementation(generateUseSelectorRouter());
const props = createProps();
const { getByText } = renderWithProvider(<FeeCard {...props} />);
expect(getByText('Best of 6 quotes.')).toBeInTheDocument();
expect(getByText('6 quotes.')).toBeInTheDocument();
expect(getByText('Estimated gas fee')).toBeInTheDocument();
expect(getByText('Max fee')).toBeInTheDocument();
expect(getByText(props.primaryFee.fee)).toBeInTheDocument();
Expand All @@ -116,7 +116,7 @@ describe('FeeCard', () => {
maxFeePerGasDecGWEI: '4',
});
const { getByText } = renderWithProvider(<FeeCard {...props} />);
expect(getByText('Best of 6 quotes.')).toBeInTheDocument();
expect(getByText('6 quotes.')).toBeInTheDocument();
expect(getByText('Estimated gas fee')).toBeInTheDocument();
expect(getByText('Max fee')).toBeInTheDocument();
expect(getByText(props.primaryFee.fee)).toBeInTheDocument();
Expand All @@ -138,7 +138,7 @@ describe('FeeCard', () => {
const { getByText, queryByTestId } = renderWithProvider(
<FeeCard {...props} />,
);
expect(getByText('Best of 6 quotes.')).toBeInTheDocument();
expect(getByText('6 quotes.')).toBeInTheDocument();
expect(getByText('Estimated gas fee')).toBeInTheDocument();
expect(getByText(props.primaryFee.fee)).toBeInTheDocument();
expect(getByText(props.secondaryFee.fee)).toBeInTheDocument();
Expand Down
Loading

0 comments on commit 741c35f

Please sign in to comment.