Skip to content

Commit

Permalink
enhancement: warn about approvals for tokens that are not currently h…
Browse files Browse the repository at this point in the history
…eld (#2711)

* add warning to approval popup

* add locale
  • Loading branch information
MarkNerdi authored and jeeanribeiro committed Jul 5, 2024
1 parent a1f3d79 commit 0fefe6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import { EvmTransactionAlert } from '.'
import { IToken } from '@core/token'
import { openUrlInBrowser } from '@core/app/utils'
import { Alert } from '@bloomwalletio/ui'
export let parsedTokenApproval: IParsedTokenApproval
export let networkId: EvmNetworkId
Expand Down Expand Up @@ -37,6 +38,7 @@
{#if tokenTransfer.token}
<TransactionAssetSection {tokenTransfer} />
{:else}
<Alert variant="warning" text={localize('popups.tokenApproval.warning')} />
<Table
collapsible
collapsibleTitle={localize('general.details')}
Expand Down
1 change: 1 addition & 0 deletions packages/shared/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,7 @@
"tokenApproval": {
"title": "Approve {dappName} to access {assetName}",
"hint": "{address} is requesting approval to spend {assetName}",
"warning": "You don't own any of the approved tokens. Only approve tokens you trust.",
"action": "Approve",
"success": "Successfully approved"
},
Expand Down

0 comments on commit 0fefe6e

Please sign in to comment.