Skip to content

Commit

Permalink
Merge branch 'develop' into release/v2.1.15
Browse files Browse the repository at this point in the history
  • Loading branch information
vzhovnitsky committed Sep 23, 2024
2 parents c9b5ebe + 675d19f commit 7a8aa83
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 6 deletions.
4 changes: 3 additions & 1 deletion app/components/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ export const ItemSwitch = memo((props: {
onChange: (value: boolean) => void,
leftIcon?: ImageSourcePropType,
leftIconComponent?: any,
titleStyle?: StyleProp<TextStyle>
titleStyle?: StyleProp<TextStyle>,
style?: StyleProp<TextStyle>,
disabled?: boolean,
}) => {
const theme = useTheme();
Expand All @@ -61,6 +62,7 @@ export const ItemSwitch = memo((props: {
minHeight: 72
},
Platform.select({ android: { opacity: props.disabled ? 0.8 : 1 } }),
props.style
]}
disabled={props.disabled}
>
Expand Down
1 change: 1 addition & 0 deletions app/fragments/secure/components/TransferSingle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ export const TransferSingle = memo((props: ConfirmLoadedPropsSingle) => {
contact={contact}
failed={failed}
isGasless={fees.type === 'gasless' && fees.params.ok}
onSetUseGasless={onSetUseGasless}
/>
);
});
17 changes: 14 additions & 3 deletions app/fragments/secure/components/TransferSingleView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { ThemeType } from "../../../engine/state/theme";
import { ForcedAvatar, ForcedAvatarType } from "../../../components/avatar/ForcedAvatar";
import { HoldersOp, HoldersOpView } from "../../../components/transfer/HoldersOpView";
import { TransferEstimate } from "../TransferFragment";
import { ItemSwitch } from "../../../components/Item";

import WithStateInit from '@assets/ic_sign_contract.svg';
import IcAlert from '@assets/ic-alert.svg';
Expand Down Expand Up @@ -109,7 +110,8 @@ export const TransferSingleView = memo(({
isLedger,
contact,
failed,
isGasless
isGasless,
onSetUseGasless
}: {
operation: StoredOperation,
order: Order | LedgerOrder,
Expand All @@ -135,7 +137,8 @@ export const TransferSingleView = memo(({
isLedger?: boolean,
contact?: AddressContact | null,
failed: boolean,
isGasless?: boolean
isGasless?: boolean,
onSetUseGasless?: (useGasless: boolean) => void
}) => {
const toaster = useToaster();
const navigation = useTypedNavigation();
Expand Down Expand Up @@ -628,7 +631,15 @@ export const TransferSingleView = memo(({
</Text>
</View>
</View>

{!!onSetUseGasless && (
<ItemSwitch
title={t('transfer.gaslessTransferSwitch', { symbol: jetton?.symbol })}
value={isGasless ?? false}
onChange={onSetUseGasless}
style={{ padding: 0, minHeight: 0, marginTop: 16 }}
titleStyle={[{ color: theme.textSecondary }, Typography.regular15_20]}
/>
)}
{(amount > toNano('0.2') && !isGasless) && (
<Pressable
onPress={jettonsGasAlert}
Expand Down
3 changes: 2 additions & 1 deletion app/i18n/i18n_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ const schema: PrepareSchema<LocalizationSchema, '' | '_plural'> = {
notEnoughJettonsTitle: 'Not enough jettons',
notEnoughJettonsMessage: 'You are trying to send more jettons than you have',
aboutFees: 'About fees',
aboutFeesDescription: 'The fees for transactions on the blockchain depend on several factors, such as network congestion, transaction size, gas price, and blockchain configuration parameters. The higher the demand for transaction processing on the blockchain or the larger the transaction size (message/comment), the higher the fees will be.'
aboutFeesDescription: 'The fees for transactions on the blockchain depend on several factors, such as network congestion, transaction size, gas price, and blockchain configuration parameters. The higher the demand for transaction processing on the blockchain or the larger the transaction size (message/comment), the higher the fees will be.',
gaslessTransferSwitch: 'Pay gas fee in {{symbol}}'
},
auth: {
phoneVerify: 'Verify phone',
Expand Down
3 changes: 2 additions & 1 deletion app/i18n/i18n_ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ const schema: PrepareSchema<LocalizationSchema, '_0' | '_1' | '_2'> = {
"notEnoughJettonsTitle": "Недостаточно жетонов",
"notEnoughJettonsMessage": "У вас недостаточно жетонов для отправки",
"aboutFees": "О комиссиях",
"aboutFeesDescription": "Комиссии за транзакции в блокчейне зависят от нескольких факторов: загруженности сети, размера транзакции, цены газа и конфигурационных параметров блокчейна. Чем больше размер транзакции (сообщение/комментарий транзакции) или выше спрос на обработку, тем выше будут комиссии."
"aboutFeesDescription": "Комиссии за транзакции в блокчейне зависят от нескольких факторов: загруженности сети, размера транзакции, цены газа и конфигурационных параметров блокчейна. Чем больше размер транзакции (сообщение/комментарий транзакции) или выше спрос на обработку, тем выше будут комиссии.",
"gaslessTransferSwitch": "Оплатить комиссию в {{symbol}}"
},
"auth": {
"phoneNumber": "Номер телефона",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ export type LocalizationSchema = {
notEnoughJettonsMessage: string,
aboutFees: string,
aboutFeesDescription: string,
gaslessTransferSwitch: string
},
auth: {
phoneVerify: string,
Expand Down

0 comments on commit 7a8aa83

Please sign in to comment.