Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -173,19 +173,19 @@ export const GasSetting1559 = memo(() => {
.object({
gasLimit: zod
.string()
.min(1, t('wallet_transfer_error_gasLimit_absence'))
.min(1, t('wallet_transfer_error_gas_limit_absence'))
.refine(
(gasLimit) => new BigNumber(gasLimit).isGreaterThanOrEqualTo(minGasLimit ?? 0),
t('popups_wallet_gas_fee_settings_min_gas_limit_tips', { limit: minGasLimit }),
),
maxPriorityFeePerGas: zod
.string()
.min(1, t('wallet_transfer_error_maxPriority_fee_absence'))
.min(1, t('wallet_transfer_error_max_priority_fee_absence'))
.refine(
(value) => new BigNumber(value).isPositive(),
t('wallet_transfer_error_max_priority_gas_fee_positive'),
),
maxFeePerGas: zod.string().min(1, t('wallet_transfer_error_maxFee_absence')),
maxFeePerGas: zod.string().min(1, t('wallet_transfer_error_max_fee_absence')),
})
.refine((data) => new BigNumber(data.maxPriorityFeePerGas).isLessThanOrEqualTo(data.maxFeePerGas), {
message: t('wallet_transfer_error_max_priority_gas_fee_imbalance'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ export const Prior1559GasSetting = memo(() => {
return zod.object({
gasLimit: zod
.string()
.min(1, t('wallet_transfer_error_gasLimit_absence'))
.min(1, t('wallet_transfer_error_gas_limit_absence'))
.refine(
(gasLimit) => new BigNumber(gasLimit).gte(minGasLimit ?? 0),
t('popups_wallet_gas_fee_settings_min_gas_limit_tips', { limit: minGasLimit }),
),
gasPrice: zod.string().min(1, t('wallet_transfer_error_gasPrice_absence')),
gasPrice: zod.string().min(1, t('wallet_transfer_error_gas_price_absence')),
})
}, [minGasLimit])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,12 @@ export const Prior1559Transfer = memo<Prior1559TransferProps>(({ selectedAsset,
}, t('wallet_transfer_error_insufficient_balance', { token: selectedAsset?.token.symbol })),
gasLimit: zod
.string()
.min(1, t('wallet_transfer_error_gasLimit_absence'))
.min(1, t('wallet_transfer_error_gas_limit_absence'))
.refine(
(gasLimit) => new BigNumber(gasLimit).isGreaterThanOrEqualTo(minGasLimitContext),
t('popups_wallet_gas_fee_settings_min_gas_limit_tips', { limit: minGasLimitContext }),
),
gasPrice: zod.string().min(1, t('wallet_transfer_error_gasPrice_absence')),
gasPrice: zod.string().min(1, t('wallet_transfer_error_gas_price_absence')),
})
}, [selectedAsset, minGasLimitContext])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,14 @@ export const Transfer1559 = memo<Transfer1559Props>(({ selectedAsset, openAssetM
}, t('wallet_transfer_error_insufficient_balance', { token: selectedAsset?.token.symbol })),
gasLimit: zod
.string()
.min(1, t('wallet_transfer_error_gasLimit_absence'))
.min(1, t('wallet_transfer_error_gas_limit_absence'))
.refine(
(gasLimit) => new BigNumber(gasLimit).isGreaterThanOrEqualTo(minGasLimitContext),
t('popups_wallet_gas_fee_settings_min_gas_limit_tips', { limit: minGasLimitContext }),
),
maxPriorityFeePerGas: zod
.string()
.min(1, t('wallet_transfer_error_maxPriority_fee_absence'))
.min(1, t('wallet_transfer_error_max_priority_fee_absence'))
.refine(
(value) => new BigNumber(value).isPositive(),
t('wallet_transfer_error_max_priority_gas_fee_positive'),
Expand All @@ -208,7 +208,7 @@ export const Transfer1559 = memo<Transfer1559Props>(({ selectedAsset, openAssetM
),
maxFeePerGas: zod
.string()
.min(1, t('wallet_transfer_error_maxFee_absence'))
.min(1, t('wallet_transfer_error_max_fee_absence'))
.refine(
(value) =>
new BigNumber(value).isGreaterThanOrEqualTo(
Expand Down
8 changes: 4 additions & 4 deletions packages/maskbook/src/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,10 @@
"wallet_transfer_error_address_absence": "Enter recipient address",
"wallet_transfer_error_invalid_address": "Invalid recipient address",
"wallet_transfer_error_insufficient_balance": "Insufficient {{symbol}} balance",
"wallet_transfer_error_gasPrice_absence": "Enter a gas price",
"wallet_transfer_error_gasLimit_absence": "Enter a gas limit",
"wallet_transfer_error_maxFee_absence": "Enter a max fee",
"wallet_transfer_error_maxPriority_fee_absence": "Enter a max priority fee",
"wallet_transfer_error_gas_price_absence": "Enter a gas price",
"wallet_transfer_error_gas_limit_absence": "Enter a gas limit",
"wallet_transfer_error_max_fee_absence": "Enter a max fee",
"wallet_transfer_error_max_priority_fee_absence": "Enter a max priority fee",
"wallet_transfer_error_max_fee_too_low": "Max fee is too low for network conditions.",
"wallet_transfer_error_max_fee_too_high": "Max fee is higher than necessary",
"wallet_transfer_error_max_priority_gas_fee_positive": "Max priority fee must be greater than 0 GWEI",
Expand Down
8 changes: 4 additions & 4 deletions packages/maskbook/src/locales/ko-KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,10 @@
"wallet_transfer_error_address_absence": "받는 주소 입력",
"wallet_transfer_error_invalid_address": "무효한 받는 주소",
"wallet_transfer_error_insufficient_balance": "{{symbol}} 잔액 부족",
"wallet_transfer_error_gasPrice_absence": "가스비 입력",
"wallet_transfer_error_gasLimit_absence": "기스비 한도 입력",
"wallet_transfer_error_maxFee_absence": "최대 가스비 입력",
"wallet_transfer_error_maxPriority_fee_absence": "최대 우선 가스비 입력",
"wallet_transfer_error_gas_price_absence": "가스비 입력",
"wallet_transfer_error_gas_limit_absence": "기스비 한도 입력",
"wallet_transfer_error_max_fee_absence": "최대 가스비 입력",
"wallet_transfer_error_max_priority_fee_absence": "최대 우선 가스비 입력",
"wallet_transfer_error_max_fee_too_low": "현재 네트워크 컨디션에서 최대 가스비가 너무 낮습니다.",
"wallet_transfer_error_max_fee_too_high": "최대 가스비는 필요한 것보다 높습니다.",
"wallet_transfer_error_max_priority_gas_fee_positive": "최대 우선 가스비는 0 GWEI보다 높아야 합니다",
Expand Down
8 changes: 4 additions & 4 deletions packages/maskbook/src/locales/qya-AA.json
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,10 @@
"wallet_transfer_error_address_absence": "crwdns4545:0crwdne4545:0",
"wallet_transfer_error_invalid_address": "crwdns4547:0crwdne4547:0",
"wallet_transfer_error_insufficient_balance": "crwdns7961:0{{symbol}}crwdne7961:0",
"wallet_transfer_error_gasPrice_absence": "crwdns8035:0crwdne8035:0",
"wallet_transfer_error_gasLimit_absence": "crwdns8037:0crwdne8037:0",
"wallet_transfer_error_maxFee_absence": "crwdns8039:0crwdne8039:0",
"wallet_transfer_error_maxPriority_fee_absence": "crwdns8041:0crwdne8041:0",
"wallet_transfer_error_gas_price_absence": "crwdns8035:0crwdne8035:0",
"wallet_transfer_error_gas_limit_absence": "crwdns8037:0crwdne8037:0",
"wallet_transfer_error_max_fee_absence": "crwdns8039:0crwdne8039:0",
"wallet_transfer_error_max_priority_fee_absence": "crwdns8041:0crwdne8041:0",
"wallet_transfer_error_max_fee_too_low": "crwdns8043:0crwdne8043:0",
"wallet_transfer_error_max_fee_too_high": "crwdns8045:0crwdne8045:0",
"wallet_transfer_error_max_priority_gas_fee_positive": "crwdns8047:0crwdne8047:0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,19 @@ export const GasSetting1559: FC<GasSettingProps> = memo(
.object({
gasLimit: zod
.string()
.min(1, t('wallet_transfer_error_gasLimit_absence'))
.min(1, t('wallet_transfer_error_gas_limit_absence'))
.refine(
(gasLimit) => new BigNumber(gasLimit).isGreaterThanOrEqualTo(minGasLimit ?? 0),
t('popups_wallet_gas_fee_settings_min_gas_limit_tips', { limit: minGasLimit }),
),
maxPriorityFeePerGas: zod
.string()
.min(1, t('wallet_transfer_error_maxPriority_fee_absence'))
.min(1, t('wallet_transfer_error_max_priority_fee_absence'))
.refine(
(value) => new BigNumber(value).isPositive(),
t('wallet_transfer_error_max_priority_gas_fee_positive'),
),
maxFeePerGas: zod.string().min(1, t('wallet_transfer_error_maxFee_absence')),
maxFeePerGas: zod.string().min(1, t('wallet_transfer_error_max_fee_absence')),
})
.refine((data) => new BigNumber(data.maxPriorityFeePerGas).isLessThanOrEqualTo(data.maxFeePerGas), {
message: t('wallet_transfer_error_max_priority_gas_fee_imbalance'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ export const Prior1559GasSetting: FC<GasSettingProps> = memo(
return zod.object({
gasLimit: zod
.string()
.min(1, t('wallet_transfer_error_gasLimit_absence'))
.min(1, t('wallet_transfer_error_gas_limit_absence'))
.refine(
(gasLimit) => new BigNumber(gasLimit).gte(minGasLimit ?? 0),
t('popups_wallet_gas_fee_settings_min_gas_limit_tips', { limit: minGasLimit }),
),
gasPrice: zod.string().min(1, t('wallet_transfer_error_gasPrice_absence')),
gasPrice: zod.string().min(1, t('wallet_transfer_error_gas_price_absence')),
})
}, [minGasLimit])

Expand Down