fix: 将划转最小限制从5改为0.01积分股

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-01-18 19:29:05 -08:00
parent dcf413fb72
commit 07247fe05f
2 changed files with 6 additions and 5 deletions

View File

@ -16,7 +16,7 @@ export class TransferService {
private readonly prisma: PrismaService,
private readonly configService: ConfigService,
) {
this.minTransferAmount = this.configService.get<number>('MIN_TRANSFER_AMOUNT', 5);
this.minTransferAmount = this.configService.get<number>('MIN_TRANSFER_AMOUNT', 0.01);
this.miningServiceUrl = this.configService.get<string>('MINING_SERVICE_URL', 'http://localhost:3021');
}

View File

@ -577,12 +577,13 @@ class _TradingPageState extends ConsumerState<TradingPage> {
_buildInputField('价格', _priceController, '请输入价格', '积分值'),
const SizedBox(height: 16),
// - "全部"
// 使
_buildQuantityInputField(
'数量',
_quantityController,
'请输入数量',
'积分股',
_selectedTab == 1 ? availableShares : null,
_selectedTab == 1 ? tradingShareBalance : null,
_selectedTab == 0 ? availableCash : null,
currentPrice,
),
@ -1420,7 +1421,7 @@ class _TransferBottomSheetState extends ConsumerState<_TransferBottomSheet> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text(
'提示: 最低划转数量为 5 积分股',
'提示: 最低划转数量为 0.01 积分股',
style: TextStyle(fontSize: 12, color: _grayText),
),
GestureDetector(
@ -1489,9 +1490,9 @@ class _TransferBottomSheetState extends ConsumerState<_TransferBottomSheet> {
}
final amountValue = double.tryParse(amount) ?? 0;
if (amountValue < 5) {
if (amountValue < 0.01) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text('最低划转数量为 5 积分股')),
const SnackBar(content: Text('最低划转数量为 0.01 积分股')),
);
return;
}