fix: 将划转最小限制从5改为0.01积分股
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
dcf413fb72
commit
07247fe05f
|
|
@ -16,7 +16,7 @@ export class TransferService {
|
||||||
private readonly prisma: PrismaService,
|
private readonly prisma: PrismaService,
|
||||||
private readonly configService: ConfigService,
|
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');
|
this.miningServiceUrl = this.configService.get<string>('MINING_SERVICE_URL', 'http://localhost:3021');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -577,12 +577,13 @@ class _TradingPageState extends ConsumerState<TradingPage> {
|
||||||
_buildInputField('价格', _priceController, '请输入价格', '积分值'),
|
_buildInputField('价格', _priceController, '请输入价格', '积分值'),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
// 数量输入 - 带"全部"按钮
|
// 数量输入 - 带"全部"按钮
|
||||||
|
// 卖出时使用交易账户积分股余额(只能卖出交易账户的,挖矿账户需要先划转)
|
||||||
_buildQuantityInputField(
|
_buildQuantityInputField(
|
||||||
'数量',
|
'数量',
|
||||||
_quantityController,
|
_quantityController,
|
||||||
'请输入数量',
|
'请输入数量',
|
||||||
'积分股',
|
'积分股',
|
||||||
_selectedTab == 1 ? availableShares : null,
|
_selectedTab == 1 ? tradingShareBalance : null,
|
||||||
_selectedTab == 0 ? availableCash : null,
|
_selectedTab == 0 ? availableCash : null,
|
||||||
currentPrice,
|
currentPrice,
|
||||||
),
|
),
|
||||||
|
|
@ -1420,7 +1421,7 @@ class _TransferBottomSheetState extends ConsumerState<_TransferBottomSheet> {
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
const Text(
|
const Text(
|
||||||
'提示: 最低划转数量为 5 积分股',
|
'提示: 最低划转数量为 0.01 积分股',
|
||||||
style: TextStyle(fontSize: 12, color: _grayText),
|
style: TextStyle(fontSize: 12, color: _grayText),
|
||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
|
|
@ -1489,9 +1490,9 @@ class _TransferBottomSheetState extends ConsumerState<_TransferBottomSheet> {
|
||||||
}
|
}
|
||||||
|
|
||||||
final amountValue = double.tryParse(amount) ?? 0;
|
final amountValue = double.tryParse(amount) ?? 0;
|
||||||
if (amountValue < 5) {
|
if (amountValue < 0.01) {
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
const SnackBar(content: Text('最低划转数量为 5 积分股')),
|
const SnackBar(content: Text('最低划转数量为 0.01 积分股')),
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue