Skip to content

Commit

Permalink
allow user to check money address
Browse files Browse the repository at this point in the history
  • Loading branch information
ethan-tbd committed Jul 19, 2024
1 parent b7daf0a commit d4dbe69
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/features/payment/payment_details_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ class PaymentDetailsPage extends HookConsumerWidget {
useEffect(
() {
if (state.value.moneyAddresses != null) {
Future.microtask(
() async => _checkCredsAndSendRfq(context, ref, rfq, state),
);
state.value =
state.value.copyWith(formData: paymentState.payoutDetails);
} else {
final selectedMethod = (availableMethods?.length ?? 0) <= 1
? availableMethods?.firstOrNull
Expand Down Expand Up @@ -94,7 +93,9 @@ class PaymentDetailsPage extends HookConsumerWidget {
Header(
title:
paymentState.transactionType == TransactionType.send
? Loc.of(context).enterTheirPaymentDetails
? state.value.moneyAddresses != null
? Loc.of(context).checkTheirPaymentDetails
: Loc.of(context).enterTheirPaymentDetails
: Loc.of(context).enterYourPaymentDetails,
subtitle: Loc.of(context).makeSureInfoIsCorrect,
),
Expand Down Expand Up @@ -131,8 +132,7 @@ class PaymentDetailsPage extends HookConsumerWidget {
) =>
Expanded(
child: JsonSchemaForm(
schema: state.value.selectedPaymentMethod?.schema,
isDisabled: state.value.selectedPaymentMethod == null,
state: state.value,
onSubmit: (formData) {
state.value = state.value.copyWith(formData: formData);
_checkCredsAndSendRfq(
Expand Down

0 comments on commit d4dbe69

Please sign in to comment.