diff --git a/wails-frontend/src/i18n/en_US.json b/wails-frontend/src/i18n/en_US.json index f1dbbbac4..4c51fe824 100644 --- a/wails-frontend/src/i18n/en_US.json +++ b/wails-frontend/src/i18n/en_US.json @@ -51,8 +51,10 @@ "message-format": "Message format: ", "function-called": "Function called", "fees": "Fees ", - "fees-tooltip": "The compensation paid to", - "fees-tooltip-2": "validators for computational work.", + "fees-tooltip": { + "1": "The compensation paid to", + "2": "validators for computational work." + }, "coins": "Coins ", "coins-tooltip": "The amount of coins locked for", "coins-tooltip-2": "storage space on the ledger.", @@ -60,7 +62,7 @@ "confirm-fees": "confirm change", "reset-fees": "reset to default", "sending-amount": "Sending amount ", - "max-coins": "Max coins", + "max-coins": "Max. spendable MAS", "roll-amount": "Roll amount", "amount-to-send": "Amount to send", "spend-amount": "Spend amount", @@ -71,6 +73,19 @@ "2": "Roll sell", "3": "Execute SC", "4": "Call SC" + }, + "execute-sc-tooltip": { + "1": "ExecuteSC operation is a powerful functionality on Massa. It enables the execution of smart contracts directly, instead of storing them on-chain.", + "2": "As it is a smart contract which is executing certain functions, coins and tokens can be spent from your account.", + "3": "Proceed only if it originates from a trusted source." + }, + "execute-sc-warning": { + "1": "Proceed only if it originates from a trusted source.", + "2": "This operation is like a smart contract and can spend coins and tokens from your account." + }, + "execute-sc-max-coins-tooltip": { + "1": "Most similar concept is Giving Allowance on EVM chains.", + "2": "In ExecuteSC sense, it is the maximal amount of MAS that can be spent in this operation." } } }, diff --git a/wails-frontend/src/pages/PasswordPromptHandler/BuySellRoll/BuySellRoll.tsx b/wails-frontend/src/pages/PasswordPromptHandler/BuySellRoll/BuySellRoll.tsx index 892807513..ca9a26804 100644 --- a/wails-frontend/src/pages/PasswordPromptHandler/BuySellRoll/BuySellRoll.tsx +++ b/wails-frontend/src/pages/PasswordPromptHandler/BuySellRoll/BuySellRoll.tsx @@ -1,8 +1,8 @@ -import { SignBodyProps } from '../Sign'; -import { Description } from '../SignComponentUtils/Description'; -import { From } from '../SignComponentUtils/From'; import { OPER_BUY_ROLL } from '@/const/operations'; import Intl from '@/i18n/i18n'; +import { SignBodyProps } from '@/pages/PasswordPromptHandler/Sign'; +import { Description } from '@/pages/PasswordPromptHandler/SignComponentUtils/Description'; +import { From } from '@/pages/PasswordPromptHandler/SignComponentUtils/From'; import { formatStandard, masToken } from '@/utils'; export function BuySellRoll(props: SignBodyProps) { diff --git a/wails-frontend/src/pages/PasswordPromptHandler/SignSC/CallSc.tsx b/wails-frontend/src/pages/PasswordPromptHandler/CallSC/CallSc.tsx similarity index 53% rename from wails-frontend/src/pages/PasswordPromptHandler/SignSC/CallSc.tsx rename to wails-frontend/src/pages/PasswordPromptHandler/CallSC/CallSc.tsx index 51fa9f7a3..980c550f7 100644 --- a/wails-frontend/src/pages/PasswordPromptHandler/SignSC/CallSc.tsx +++ b/wails-frontend/src/pages/PasswordPromptHandler/CallSC/CallSc.tsx @@ -1,9 +1,7 @@ -import { FiArrowRight } from 'react-icons/fi'; - -import { Description } from '../SignComponentUtils/Description'; import Intl from '@/i18n/i18n'; import { SignBodyProps } from '@/pages/PasswordPromptHandler/Sign'; -import { maskAddress, maskNickname } from '@/utils'; +import { Description } from '@/pages/PasswordPromptHandler/SignComponentUtils/Description'; +import { FromTo } from '@/pages/PasswordPromptHandler/SignComponentUtils/FromTo'; export function CallSc(props: SignBodyProps) { const { @@ -18,26 +16,12 @@ export function CallSc(props: SignBodyProps) { return (
- {Intl.t('password-prompt.sign.from')} -
-{maskNickname(Nickname)}
-{maskAddress(WalletAddress)}
-- {Intl.t('password-prompt.sign.contract')} -
-{maskAddress(Address)}
-{Intl.t('password-prompt.sign.operation-type')}
-{Intl.t(`password-prompt.sign.operation-types.${OperationType}`)}
++ {Intl.t(`password-prompt.sign.operation-types.${OperationType}`)} +
+{Intl.t('password-prompt.sign.max-coins')}
-- {formatStandard(MaxCoins, Unit.NanoMAS)} {masToken} +
+ {Intl.t('password-prompt.sign.execute-sc-warning.1')}
+
+ {Intl.t('password-prompt.sign.execute-sc-warning.2')}
{Intl.t('password-prompt.sign.max-coins')}
++ {formatStandard(MaxCoins, Unit.NanoMAS)} {masToken} +
++ {Intl.t('password-prompt.sign.from')} +
+{maskNickname(nickname)}
+{maskAddress(walletAddress)}
+{Intl.t(label)}
+ {recipientNickname ? ( ++ {maskNickname(recipientNickname)} +
+ ) : null} +{maskAddress(recipientAddress)}
+- {Intl.t('password-prompt.sign.from')} -
-{maskNickname(Nickname)}
-{maskAddress(WalletAddress)}
-- {Intl.t('password-prompt.sign.to')} -
- {RecipientAddress ? ( -- {maskNickname(RecipientNickname)} -
- ) : null} -{maskAddress(RecipientAddress)}
-