Skip to content

Commit

Permalink
fix: add new translations
Browse files Browse the repository at this point in the history
  • Loading branch information
sahar-fehri committed Dec 10, 2024
1 parent 9d63e34 commit c2d8c6a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
19 changes: 16 additions & 3 deletions app/components/UI/Transactions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ class Transactions extends PureComponent {
*/
onScrollThroughContent: PropTypes.func,
gasFeeEstimates: PropTypes.object,
/**
* Chain ID of the token
*/
tokenChainId: PropTypes.string,
/**
* ID of the global network client
*/
Expand Down Expand Up @@ -369,6 +373,15 @@ class Transactions extends PureComponent {
renderEmpty = () => {
const { colors, typography } = this.context || mockTheme;
const styles = createStyles(colors, typography);
if (this.props.tokenChainId !== this.props.chainId) {
return (
<View style={styles.emptyContainer}>
<Text style={styles.textTransactions}>
{strings('wallet.switch_network_to_view_transactions')}
</Text>
</View>
);
}
return (
<View style={styles.emptyContainer}>
<Text style={styles.text}>{strings('wallet.no_transactions')}</Text>
Expand Down Expand Up @@ -572,7 +585,7 @@ class Transactions extends PureComponent {
const onConfirmation = (isComplete) => {
if (isComplete) {
transaction.speedUpParams &&
transaction.speedUpParams?.type === 'SpeedUp'
transaction.speedUpParams?.type === 'SpeedUp'
? this.onSpeedUpCompleted()
: this.onCancelCompleted();
}
Expand Down Expand Up @@ -758,8 +771,8 @@ class Transactions extends PureComponent {
const transactions =
submittedTransactions && submittedTransactions.length
? submittedTransactions
.sort((a, b) => b.time - a.time)
.concat(confirmedTransactions)
.sort((a, b) => b.time - a.time)
.concat(confirmedTransactions)
: this.props.transactions;

const renderRetryGas = (rate) => {
Expand Down
1 change: 1 addition & 0 deletions locales/languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@
"learn_more": "Learn more",
"add_collectibles": "Import NFTs",
"no_transactions": "You have no transactions!",
"switch_network_to_view_transactions": "Please switch network to view transactions",
"send_button": "Send",
"deposit_button": "Deposit",
"copy_address": "Copy",
Expand Down

0 comments on commit c2d8c6a

Please sign in to comment.