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
@@ -0,0 +1,31 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'package:sxchnge_wallet/sxchnge_wallet.dart';
|
||||
|
||||
const testDestination = CryptoDestination(
|
||||
assetId: 'demo:ethereum:native',
|
||||
networkId: 'eip155:1',
|
||||
address: '0x1234567890123456789012345678901234567890',
|
||||
assetLabel: 'ETH',
|
||||
networkLabel: 'Ethereum',
|
||||
);
|
||||
Future<void> seedDestination(DummyDestinationService service) async {
|
||||
await service.create(
|
||||
testDestination,
|
||||
'Test wallet',
|
||||
'test-destination-creation',
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> selectPayout(WidgetTester t) async {
|
||||
final button = find.byKey(const ValueKey('choose-payout-destination'));
|
||||
await t.ensureVisible(button);
|
||||
await t.tap(button);
|
||||
await t.pumpAndSettle();
|
||||
final row = find.text('Test wallet');
|
||||
await t.ensureVisible(row);
|
||||
await t.tap(row);
|
||||
await t.pumpAndSettle();
|
||||
}
|
||||
Reference in new issue
Block a user