Add saved payout destination UX and service contracts (#54)
This commit is contained in:
1 parent
a5689876ff
commit
24af794112
49 files changed
+4687
-62
No files matched your search
@@ -6,9 +6,15 @@ import 'package:sxchnge_analytics/sxchnge_analytics.dart';
|
||||
|
||||
import 'package:sxchnge_auth/sxchnge_auth.dart';
|
||||
|
||||
import 'package:sxchnge_kyc/sxchnge_kyc.dart';
|
||||
|
||||
import 'package:sxchnge_wallet/sxchnge_wallet.dart';
|
||||
|
||||
import 'package:sxchnge_app/main.dart';
|
||||
import 'package:sxchnge_app/providers/locale.dart';
|
||||
|
||||
import 'destination_helpers.dart';
|
||||
|
||||
Future<void> tapFactor(WidgetTester t, String key) async {
|
||||
final finder = find.byKey(ValueKey(key));
|
||||
await t.ensureVisible(finder);
|
||||
@@ -31,8 +37,16 @@ Future<DummyTwoFactorService> openFactor(
|
||||
delay: Duration.zero,
|
||||
method: method,
|
||||
);
|
||||
final wallet = DummyWalletService(
|
||||
DummyIdentityService(delay: Duration.zero),
|
||||
factors: service,
|
||||
initialLocale: locale,
|
||||
delay: Duration.zero,
|
||||
);
|
||||
await seedDestination(wallet.destinations);
|
||||
await t.pumpWidget(
|
||||
SxchngeApp(
|
||||
walletService: wallet,
|
||||
twoFactorService: service,
|
||||
analyticsService: analytics,
|
||||
localeProvider: LocaleProvider(initialLocale: Locale(locale)),
|
||||
@@ -174,10 +188,7 @@ void main() {
|
||||
await openFactor(t, path: '/$kind', enabled: true);
|
||||
await t.enterText(find.byKey(const ValueKey('transfer-amount')), '10');
|
||||
if (kind == 'payout') {
|
||||
await t.enterText(
|
||||
find.byKey(const ValueKey('transfer-recipient')),
|
||||
'Sample recipient',
|
||||
);
|
||||
await selectPayout(t);
|
||||
}
|
||||
await tapFactor(t, 'transfer-review');
|
||||
await tapFactor(t, 'transfer-confirm');
|
||||
|
||||
Reference in new issue
Block a user