Fixed payment information form in address recipient book and fixed some headers

This commit is contained in:
Arseni
2025-12-25 15:10:20 +03:00
parent f02f3449f3
commit be10839e3a
16 changed files with 85 additions and 36 deletions

View File

@@ -67,10 +67,17 @@ class _CardFormMinimalState extends State<CardFormMinimal> {
}
if (newData != null && newData != oldData) {
_panController.text = newData.pan;
_firstNameController.text = newData.firstName;
_lastNameController.text = newData.lastName;
WidgetsBinding.instance.addPostFrameCallback((_) => _emitIfValid());
final hasPanChange = newData.pan != _panController.text;
final hasFirstNameChange = newData.firstName != _firstNameController.text;
final hasLastNameChange = newData.lastName != _lastNameController.text;
if (hasPanChange) _panController.text = newData.pan;
if (hasFirstNameChange) _firstNameController.text = newData.firstName;
if (hasLastNameChange) _lastNameController.text = newData.lastName;
if (hasPanChange || hasFirstNameChange || hasLastNameChange) {
WidgetsBinding.instance.addPostFrameCallback((_) => _emitIfValid());
}
}
}

View File

@@ -106,12 +106,21 @@ class _CryptoAddressFormState extends State<CryptoAddressForm> {
}
if (newData != null && newData != oldData) {
_addressCtrl.text = newData.address;
_tokenCtrl.text = newData.asset?.tokenSymbol ?? '';
_contractCtrl.text = newData.asset?.contractAddress ?? '';
_memoCtrl.text = newData.memo ?? '';
_chain = newData.asset?.chain ?? ChainNetwork.unspecified;
WidgetsBinding.instance.addPostFrameCallback((_) => _emitIfValid());
final hasAddressChange = newData.address != _addressCtrl.text;
final hasTokenChange = newData.asset?.tokenSymbol != _tokenCtrl.text;
final hasContractChange = newData.asset?.contractAddress != _contractCtrl.text;
final hasMemoChange = newData.memo != _memoCtrl.text;
final hasChainChange = newData.asset?.chain != _chain;
if (hasAddressChange) _addressCtrl.text = newData.address;
if (hasTokenChange) _tokenCtrl.text = newData.asset?.tokenSymbol ?? '';
if (hasContractChange) _contractCtrl.text = newData.asset?.contractAddress ?? '';
if (hasMemoChange) _memoCtrl.text = newData.memo ?? '';
if (hasChainChange) _chain = newData.asset?.chain ?? ChainNetwork.unspecified;
if (hasAddressChange || hasTokenChange || hasContractChange || hasMemoChange || hasChainChange) {
WidgetsBinding.instance.addPostFrameCallback((_) => _emitIfValid());
}
}
}

View File

@@ -69,11 +69,19 @@ class _IbanFormState extends State<IbanForm> {
}
if (newData != null && newData != oldData) {
_ibanController.text = newData.iban;
_accountHolderController.text = newData.accountHolder;
_bicController.text = newData.bic ?? '';
_bankNameController.text = newData.bankName ?? '';
WidgetsBinding.instance.addPostFrameCallback((_) => _emitIfValid());
final hasIbanChange = newData.iban != _ibanController.text;
final hasHolderChange = newData.accountHolder != _accountHolderController.text;
final hasBicChange = (newData.bic ?? '') != _bicController.text;
final hasBankNameChange = (newData.bankName ?? '') != _bankNameController.text;
if (hasIbanChange) _ibanController.text = newData.iban;
if (hasHolderChange) _accountHolderController.text = newData.accountHolder;
if (hasBicChange) _bicController.text = newData.bic ?? '';
if (hasBankNameChange) _bankNameController.text = newData.bankName ?? '';
if (hasIbanChange || hasHolderChange || hasBicChange || hasBankNameChange) {
WidgetsBinding.instance.addPostFrameCallback((_) => _emitIfValid());
}
}
}

View File

@@ -82,14 +82,31 @@ class _RussianBankFormState extends State<RussianBankForm> {
}
if (newData != null && newData != oldData) {
_recipientNameController.text = newData.recipientName;
_innController.text = newData.inn;
_kppController.text = newData.kpp;
_bankNameController.text = newData.bankName;
_bikController.text = newData.bik;
_accountNumberController.text = newData.accountNumber;
_correspondentAccountController.text = newData.correspondentAccount;
WidgetsBinding.instance.addPostFrameCallback((_) => _emitIfValid());
final hasRecipientNameChange = newData.recipientName != _recipientNameController.text;
final hasInnChange = newData.inn != _innController.text;
final hasKppChange = newData.kpp != _kppController.text;
final hasBankNameChange = newData.bankName != _bankNameController.text;
final hasBikChange = newData.bik != _bikController.text;
final hasAccountNumberChange = newData.accountNumber != _accountNumberController.text;
final hasCorrespondentAccountChange = newData.correspondentAccount != _correspondentAccountController.text;
if (hasRecipientNameChange) _recipientNameController.text = newData.recipientName;
if (hasInnChange) _innController.text = newData.inn;
if (hasKppChange) _kppController.text = newData.kpp;
if (hasBankNameChange) _bankNameController.text = newData.bankName;
if (hasBikChange) _bikController.text = newData.bik;
if (hasAccountNumberChange) _accountNumberController.text = newData.accountNumber;
if (hasCorrespondentAccountChange) _correspondentAccountController.text = newData.correspondentAccount;
if (hasRecipientNameChange ||
hasInnChange ||
hasKppChange ||
hasBankNameChange ||
hasBikChange ||
hasAccountNumberChange ||
hasCorrespondentAccountChange) {
WidgetsBinding.instance.addPostFrameCallback((_) => _emitIfValid());
}
}
}

View File

@@ -51,7 +51,9 @@ class _WalletFormState extends State<WalletForm> {
}
if (newData != null && newData != oldData) {
_walletIdController.text = newData.walletId;
if (newData.walletId != _walletIdController.text) {
_walletIdController.text = newData.walletId;
}
}
}