Merge branch 'revocation-mechanisme' into 'master'
Revocation mechanisme See merge request clients/gecko!29
This commit is contained in:
commit
164fc16ed8
|
@ -189,5 +189,7 @@
|
||||||
"identityMigration": "Identity migration",
|
"identityMigration": "Identity migration",
|
||||||
"areYouSureMigrateIdentity": "Are you sure you want to permanently migrate identity **{}** with balance of **{}** ?",
|
"areYouSureMigrateIdentity": "Are you sure you want to permanently migrate identity **{}** with balance of **{}** ?",
|
||||||
"someoneCreatedYourIdentity": "Someone created your {} identity !",
|
"someoneCreatedYourIdentity": "Someone created your {} identity !",
|
||||||
"confirmMyIdentity": "Confirm my identity"
|
"confirmMyIdentity": "Confirm my identity",
|
||||||
|
"revokeMyIdentity": "Revoke my identity",
|
||||||
|
"youCannotRevokeThisIdentity": "You cannot revoke this identity while\nit is member of the blacksmiths web"
|
||||||
}
|
}
|
|
@ -189,5 +189,7 @@
|
||||||
"identityMigration": "Identity migration",
|
"identityMigration": "Identity migration",
|
||||||
"areYouSureMigrateIdentity": "Are you sure you want to permanently migrate identity **{}** with balance of **{}** ?",
|
"areYouSureMigrateIdentity": "Are you sure you want to permanently migrate identity **{}** with balance of **{}** ?",
|
||||||
"someoneCreatedYourIdentity": "Someone created your {} identity !",
|
"someoneCreatedYourIdentity": "Someone created your {} identity !",
|
||||||
"confirmMyIdentity": "Confirm my identity"
|
"confirmMyIdentity": "Confirm my identity",
|
||||||
|
"revokeMyIdentity": "Revoke my identity",
|
||||||
|
"youCannotRevokeThisIdentity": "You cannot revoke this identity while\nit is member of the blacksmiths web"
|
||||||
}
|
}
|
|
@ -190,5 +190,7 @@
|
||||||
"identityMigration": "Migration de l'identité",
|
"identityMigration": "Migration de l'identité",
|
||||||
"areYouSureMigrateIdentity": "Êtes-vous certain de vouloir migrer définitivement l'identité **{}** et son solde de **{}** ?",
|
"areYouSureMigrateIdentity": "Êtes-vous certain de vouloir migrer définitivement l'identité **{}** et son solde de **{}** ?",
|
||||||
"someoneCreatedYourIdentity": "Quelqu'un a créé votre identité {} !",
|
"someoneCreatedYourIdentity": "Quelqu'un a créé votre identité {} !",
|
||||||
"confirmMyIdentity": "Confirmer mon identité"
|
"confirmMyIdentity": "Confirmer mon identité",
|
||||||
|
"revokeMyIdentity": "Révoquer mon identité",
|
||||||
|
"youCannotRevokeThisIdentity": "Vous ne pouvez pas révoquer cette identité tant\nqu'elle fait partie de la toile forgerons"
|
||||||
}
|
}
|
|
@ -2,7 +2,7 @@
|
||||||
"first_ud": 10000,
|
"first_ud": 10000,
|
||||||
"first_ud_reeval": 50,
|
"first_ud_reeval": 50,
|
||||||
"genesis_parameters": {
|
"genesis_parameters": {
|
||||||
"genesis_certs_expire_on": 500,
|
"genesis_certs_expire_on": 10,
|
||||||
"genesis_certs_min_received": 3,
|
"genesis_certs_min_received": 3,
|
||||||
"genesis_memberships_expire_on": 1051200,
|
"genesis_memberships_expire_on": 1051200,
|
||||||
"genesis_smith_certs_expire_on": 2102400,
|
"genesis_smith_certs_expire_on": 2102400,
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
"smith_cert_validity_period": 1000,
|
"smith_cert_validity_period": 1000,
|
||||||
"smith_membership_period": 1000,
|
"smith_membership_period": 1000,
|
||||||
"smith_pending_membership_period": 500,
|
"smith_pending_membership_period": 500,
|
||||||
"smiths_wot_first_cert_issuable_on": 20,
|
"smiths_wot_first_cert_issuable_on": 4,
|
||||||
"smiths_wot_min_cert_for_membership": 3,
|
"smiths_wot_min_cert_for_membership": 3,
|
||||||
"wot_first_cert_issuable_on": 0,
|
"wot_first_cert_issuable_on": 0,
|
||||||
"wot_min_cert_for_create_idty_right": 3,
|
"wot_min_cert_for_create_idty_right": 3,
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
for test_file in $(ls integration_test/scenarios/); do
|
||||||
|
testName=$(echo $test_file | awk -F '.' '{print $1}')
|
||||||
|
./integration_test/launch_test.sh $testName || break
|
||||||
|
done
|
|
@ -17,7 +17,7 @@ docker compose up -d
|
||||||
cd ../..
|
cd ../..
|
||||||
|
|
||||||
# Start integration test
|
# Start integration test
|
||||||
flutter test integration_test/$testName.dart && echo '0' > /tmp/geckoTestResult || echo '1' > /tmp/geckoTestResult
|
flutter test integration_test/scenarios/$testName.dart && echo '0' > /tmp/geckoTestResult || echo '1' > /tmp/geckoTestResult
|
||||||
|
|
||||||
# Reset .env
|
# Reset .env
|
||||||
echo "ip_address=127.0.0.1" > .env
|
echo "ip_address=127.0.0.1" > .env
|
||||||
|
|
|
@ -3,8 +3,8 @@ import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
import 'package:integration_test/integration_test.dart';
|
import 'package:integration_test/integration_test.dart';
|
||||||
import 'general_actions.dart';
|
import '../utility/general_actions.dart';
|
||||||
import 'tests_utility.dart';
|
import '../utility/tests_utility.dart';
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
||||||
|
@ -17,6 +17,7 @@ void main() async {
|
||||||
|
|
||||||
// Open chest
|
// Open chest
|
||||||
await firstOpenChest();
|
await firstOpenChest();
|
||||||
|
spawnBlock(until: 15);
|
||||||
await goBack();
|
await goBack();
|
||||||
|
|
||||||
// Go wallet 5 view
|
// Go wallet 5 view
|
||||||
|
@ -35,21 +36,27 @@ void main() async {
|
||||||
await waitFor('25.0 $currencyName');
|
await waitFor('25.0 $currencyName');
|
||||||
await spawnBlock();
|
await spawnBlock();
|
||||||
await waitFor('22.0 $currencyName');
|
await waitFor('22.0 $currencyName');
|
||||||
await bkCertify(fromAddress: test1.address, destAddress: test5.address);
|
await bkCertify(
|
||||||
await waitFor('1', exactMatch: true);
|
fromAddress: test1.address,
|
||||||
|
destAddress: test5.address,
|
||||||
|
spawnBloc: false);
|
||||||
await bkConfirmIdentity(fromAddress: test5.address, name: test5.name);
|
await bkConfirmIdentity(fromAddress: test5.address, name: test5.name);
|
||||||
await bkCertify(fromAddress: test2.address, destAddress: test5.address);
|
await waitFor('1', exactMatch: true);
|
||||||
await waitFor('2', exactMatch: true);
|
await bkCertify(
|
||||||
|
fromAddress: test2.address,
|
||||||
|
destAddress: test5.address,
|
||||||
|
spawnBloc: false);
|
||||||
|
// await waitFor('2', exactMatch: true);
|
||||||
await bkCertify(fromAddress: test3.address, destAddress: test5.address);
|
await bkCertify(fromAddress: test3.address, destAddress: test5.address);
|
||||||
await waitFor('3', exactMatch: true);
|
await waitFor('3', exactMatch: true);
|
||||||
await bkCertify(fromAddress: test4.address, destAddress: test5.address);
|
await bkCertify(fromAddress: test4.address, destAddress: test5.address);
|
||||||
await waitFor('4', exactMatch: true);
|
await waitFor('4', exactMatch: true);
|
||||||
await bkPay(
|
// await bkPay(
|
||||||
fromAddress: test2.address, destAddress: test5.address, amount: 40);
|
// fromAddress: test2.address, destAddress: test5.address, amount: 40);
|
||||||
await waitFor('61.99 $currencyName');
|
await waitFor('21.99 $currencyName');
|
||||||
await spawnBlock(until: 10);
|
await spawnBlock(until: 30);
|
||||||
await waitFor('161.99 $currencyName');
|
await waitFor('121.99 $currencyName');
|
||||||
await spawnBlock(until: 20);
|
await spawnBlock(until: 40);
|
||||||
await waitFor('261.99 $currencyName');
|
await waitFor('221.99 $currencyName');
|
||||||
}, timeout: testTimeout());
|
}, timeout: testTimeout());
|
||||||
}
|
}
|
|
@ -2,8 +2,8 @@ import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
import 'package:integration_test/integration_test.dart';
|
import 'package:integration_test/integration_test.dart';
|
||||||
import 'general_actions.dart';
|
import '../utility/general_actions.dart';
|
||||||
import 'tests_utility.dart';
|
import '../utility/tests_utility.dart';
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
||||||
|
@ -34,6 +34,7 @@ void main() async {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future payTest2() async {
|
Future payTest2() async {
|
||||||
|
spawnBlock(until: 13);
|
||||||
await waitFor('Rechercher');
|
await waitFor('Rechercher');
|
||||||
await tapKey(keyOpenSearch);
|
await tapKey(keyOpenSearch);
|
||||||
final addressToSearch = await clipPaste();
|
final addressToSearch = await clipPaste();
|
||||||
|
@ -127,13 +128,13 @@ Future certifyTest5() async {
|
||||||
await waitFor('Membre validé !');
|
await waitFor('Membre validé !');
|
||||||
|
|
||||||
// spawn 20 blocs and check if ud is creating
|
// spawn 20 blocs and check if ud is creating
|
||||||
await spawnBlock(until: 10);
|
|
||||||
await waitFor('109.13');
|
|
||||||
await spawnBlock(until: 20);
|
await spawnBlock(until: 20);
|
||||||
|
await waitFor('109.13');
|
||||||
|
await spawnBlock(until: 30);
|
||||||
await waitFor('209.13');
|
await waitFor('209.13');
|
||||||
|
|
||||||
// Check UD reval
|
// Check UD reval
|
||||||
await spawnBlock(until: 50);
|
await spawnBlock(until: 60);
|
||||||
await waitFor('509.36');
|
await waitFor('509.57');
|
||||||
humanRead(5);
|
humanRead(5);
|
||||||
}
|
}
|
|
@ -0,0 +1,53 @@
|
||||||
|
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||||
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
|
import 'package:integration_test/integration_test.dart';
|
||||||
|
import '../utility/general_actions.dart';
|
||||||
|
import '../utility/tests_utility.dart';
|
||||||
|
|
||||||
|
void main() async {
|
||||||
|
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
||||||
|
await dotenv.load();
|
||||||
|
|
||||||
|
testWidgets('Identity revocation', (testerLoc) async {
|
||||||
|
tester = testerLoc;
|
||||||
|
// Connect local node and import test chest in background
|
||||||
|
await bkFastStart();
|
||||||
|
|
||||||
|
// Open chest
|
||||||
|
await firstOpenChest();
|
||||||
|
await spawnBlock(until: 13);
|
||||||
|
await sleep();
|
||||||
|
|
||||||
|
// Create test5 identity
|
||||||
|
await bkPay(
|
||||||
|
fromAddress: test1.address, destAddress: test5.address, amount: 30);
|
||||||
|
sub.reload();
|
||||||
|
await bkCertify(fromAddress: test1.address, destAddress: test5.address);
|
||||||
|
sub.reload();
|
||||||
|
await sleep();
|
||||||
|
|
||||||
|
// Certify test5 to become member
|
||||||
|
await tapKey(keyOpenWallet(test5.address));
|
||||||
|
await bkConfirmIdentity(fromAddress: test5.address, name: test5.name);
|
||||||
|
await bkCertify(fromAddress: test2.address, destAddress: test5.address);
|
||||||
|
await bkCertify(fromAddress: test3.address, destAddress: test5.address);
|
||||||
|
await waitFor('Membre validé !', exactMatch: true);
|
||||||
|
|
||||||
|
// Revoke test5
|
||||||
|
await tapKey(keyManageMembership, duration: 1000);
|
||||||
|
await tapKey(keyRevokeIdty);
|
||||||
|
await tapKey(keyConfirm);
|
||||||
|
spawnBlock(duration: 2000);
|
||||||
|
await waitFor('validé !', timeout: const Duration(seconds: 4));
|
||||||
|
await tapKey(keyCloseTransactionScreen, duration: 0);
|
||||||
|
await waitFor('Aucune identité', exactMatch: true);
|
||||||
|
await sleep();
|
||||||
|
|
||||||
|
// Check test1 cannot be revoked
|
||||||
|
await goBack();
|
||||||
|
await tapKey(keyOpenWallet(test1.address));
|
||||||
|
await tapKey(keyManageMembership, duration: 1000);
|
||||||
|
await waitFor('Vous ne pouvez pas révoquer cette identité');
|
||||||
|
}, timeout: testTimeout());
|
||||||
|
}
|
|
@ -4,8 +4,8 @@ import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
import 'package:integration_test/integration_test.dart';
|
import 'package:integration_test/integration_test.dart';
|
||||||
import 'general_actions.dart';
|
import '../utility/general_actions.dart';
|
||||||
import 'tests_utility.dart';
|
import '../utility/tests_utility.dart';
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
|
@ -1,8 +1,8 @@
|
||||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:integration_test/integration_test.dart';
|
import 'package:integration_test/integration_test.dart';
|
||||||
import 'general_actions.dart';
|
import '../utility/general_actions.dart';
|
||||||
import 'tests_utility.dart';
|
import '../utility/tests_utility.dart';
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
|
@ -3,8 +3,8 @@ import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
import 'package:integration_test/integration_test.dart';
|
import 'package:integration_test/integration_test.dart';
|
||||||
import 'general_actions.dart';
|
import '../utility/general_actions.dart';
|
||||||
import 'tests_utility.dart';
|
import '../utility/tests_utility.dart';
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
|
@ -190,15 +190,21 @@ Future bkPay(
|
||||||
destAddress: destAddress,
|
destAddress: destAddress,
|
||||||
amount: amount,
|
amount: amount,
|
||||||
password: 'AAAAA');
|
password: 'AAAAA');
|
||||||
|
await sleep(500);
|
||||||
await spawnBlock();
|
await spawnBlock();
|
||||||
await sleep(500);
|
await sleep(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Certify in background
|
// Certify in background
|
||||||
Future bkCertify(
|
Future bkCertify(
|
||||||
{required String fromAddress, required String destAddress}) async {
|
{required String fromAddress,
|
||||||
|
required String destAddress,
|
||||||
|
bool spawnBloc = true}) async {
|
||||||
sub.certify(fromAddress, destAddress, 'AAAAA');
|
sub.certify(fromAddress, destAddress, 'AAAAA');
|
||||||
await spawnBlock();
|
if (spawnBloc) {
|
||||||
|
await sleep(500);
|
||||||
|
await spawnBlock();
|
||||||
|
}
|
||||||
await sleep(500);
|
await sleep(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,6 +212,7 @@ Future bkCertify(
|
||||||
Future bkConfirmIdentity(
|
Future bkConfirmIdentity(
|
||||||
{required String fromAddress, required String name}) async {
|
{required String fromAddress, required String name}) async {
|
||||||
sub.confirmIdentity(fromAddress, name, 'AAAAA');
|
sub.confirmIdentity(fromAddress, name, 'AAAAA');
|
||||||
|
await sleep(500);
|
||||||
await spawnBlock();
|
await spawnBlock();
|
||||||
await sleep(500);
|
await sleep(500);
|
||||||
}
|
}
|
||||||
|
@ -237,7 +244,7 @@ Future bkRestoreChest([String mnemonic = testMnemonic]) async {
|
||||||
name: 'test${number + 1}',
|
name: 'test${number + 1}',
|
||||||
derivation: (number + 1) * 2);
|
derivation: (number + 1) * 2);
|
||||||
}
|
}
|
||||||
myWalletProvider.rebuildWidget();
|
myWalletProvider.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<WalletData> _addImportAccount(
|
Future<WalletData> _addImportAccount(
|
||||||
|
@ -273,7 +280,7 @@ Future bkDeleteAllWallets() async {
|
||||||
await configBox.delete('defaultWallet');
|
await configBox.delete('defaultWallet');
|
||||||
await sub.deleteAllAccounts();
|
await sub.deleteAllAccounts();
|
||||||
myWalletProvider.pinCode = '';
|
myWalletProvider.pinCode = '';
|
||||||
myWalletProvider.rebuildWidget();
|
myWalletProvider.reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ import 'package:gecko/providers/substrate_sdk.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class ChestProvider with ChangeNotifier {
|
class ChestProvider with ChangeNotifier {
|
||||||
void rebuildWidget() {
|
void reload() {
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -219,7 +219,7 @@ class HomeProvider with ChangeNotifier {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rebuildWidget() {
|
void reload() {
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -219,7 +219,7 @@ class MyWalletsProvider with ChangeNotifier {
|
||||||
if (actualLock == lockPin) pinCode = '';
|
if (actualLock == lockPin) pinCode = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
void rebuildWidget() {
|
void reload() {
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ class SearchProvider with ChangeNotifier {
|
||||||
final cacheDuring = 20 * 60 * 1000; //First number is minutes
|
final cacheDuring = 20 * 60 * 1000; //First number is minutes
|
||||||
int cacheTime = 0;
|
int cacheTime = 0;
|
||||||
|
|
||||||
void rebuildWidget() {
|
void reload() {
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,8 @@ import 'package:gecko/models/chest_data.dart';
|
||||||
import 'package:gecko/models/wallet_data.dart';
|
import 'package:gecko/models/wallet_data.dart';
|
||||||
import 'package:gecko/providers/home.dart';
|
import 'package:gecko/providers/home.dart';
|
||||||
import 'package:gecko/providers/my_wallets.dart';
|
import 'package:gecko/providers/my_wallets.dart';
|
||||||
|
import 'package:gecko/providers/wallet_options.dart';
|
||||||
|
import 'package:gecko/providers/wallets_profiles.dart';
|
||||||
import 'package:polkawallet_sdk/api/apiKeyring.dart';
|
import 'package:polkawallet_sdk/api/apiKeyring.dart';
|
||||||
import 'package:polkawallet_sdk/api/types/networkParams.dart';
|
import 'package:polkawallet_sdk/api/types/networkParams.dart';
|
||||||
import 'package:polkawallet_sdk/api/types/txInfoData.dart';
|
import 'package:polkawallet_sdk/api/types/txInfoData.dart';
|
||||||
|
@ -46,13 +48,19 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
|
|
||||||
Future<String> _executeCall(TxInfoData txInfo, txOptions, String password,
|
Future<String> _executeCall(TxInfoData txInfo, txOptions, String password,
|
||||||
[String? rawParams]) async {
|
[String? rawParams]) async {
|
||||||
|
final walletOptions =
|
||||||
|
Provider.of<WalletOptionsProvider>(homeContext, listen: false);
|
||||||
|
final walletProfiles =
|
||||||
|
Provider.of<WalletsProfilesProvider>(homeContext, listen: false);
|
||||||
try {
|
try {
|
||||||
final hash = await sdk.api.tx
|
final hash = await sdk.api.tx.signAndSend(txInfo, txOptions, password,
|
||||||
.signAndSend(txInfo, txOptions, password, rawParam: rawParams)
|
rawParam: rawParams, onStatusChange: (p0) {
|
||||||
.timeout(
|
transactionStatus = p0;
|
||||||
const Duration(seconds: 12),
|
notifyListeners();
|
||||||
onTimeout: () => {},
|
}).timeout(
|
||||||
);
|
const Duration(seconds: 18),
|
||||||
|
onTimeout: () => {},
|
||||||
|
);
|
||||||
log.d(hash);
|
log.d(hash);
|
||||||
if (hash.isEmpty) {
|
if (hash.isEmpty) {
|
||||||
transactionStatus = 'timeout';
|
transactionStatus = 'timeout';
|
||||||
|
@ -60,8 +68,11 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
|
|
||||||
return 'timeout';
|
return 'timeout';
|
||||||
} else {
|
} else {
|
||||||
|
// Success !
|
||||||
transactionStatus = hash.toString();
|
transactionStatus = hash.toString();
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
|
walletOptions.reload();
|
||||||
|
walletProfiles.reload();
|
||||||
return hash.toString();
|
return hash.toString();
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -231,6 +242,19 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
return await idtyStatus(address) == 'Validated';
|
return await idtyStatus(address) == 'Validated';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<bool> isSmithGet(String address) async {
|
||||||
|
var idtyIndex = await _getIdentityIndexOf(address);
|
||||||
|
|
||||||
|
final Map smithExpireOn =
|
||||||
|
(await _getStorage('smithsMembership.membership($idtyIndex)')) ?? {};
|
||||||
|
|
||||||
|
if (smithExpireOn.isEmpty) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Future<Map<String, int>> certState(String from, String to) async {
|
Future<Map<String, int>> certState(String from, String to) async {
|
||||||
Map<String, int> result = {};
|
Map<String, int> result = {};
|
||||||
final toStatus = await idtyStatus(to);
|
final toStatus = await idtyStatus(to);
|
||||||
|
@ -270,6 +294,9 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<String> idtyStatus(String address) async {
|
Future<String> idtyStatus(String address) async {
|
||||||
|
// WalletOptionsProvider walletOptions =
|
||||||
|
// Provider.of<WalletOptionsProvider>(homeContext, listen: false);
|
||||||
|
|
||||||
var idtyIndex = await _getIdentityIndexOf(address);
|
var idtyIndex = await _getIdentityIndexOf(address);
|
||||||
|
|
||||||
if (idtyIndex == 0) {
|
if (idtyIndex == 0) {
|
||||||
|
@ -281,6 +308,10 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
if (idtyStatus != null) {
|
if (idtyStatus != null) {
|
||||||
final String status = idtyStatus['status'];
|
final String status = idtyStatus['status'];
|
||||||
|
|
||||||
|
// if (address == walletOptions.address.text && status == 'Validated') {
|
||||||
|
// walletOptions.reloadBuild();
|
||||||
|
// }
|
||||||
|
|
||||||
return (status);
|
return (status);
|
||||||
} else {
|
} else {
|
||||||
return 'expired';
|
return 'expired';
|
||||||
|
@ -662,13 +693,9 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
required double amount,
|
required double amount,
|
||||||
required String password}) async {
|
required String password}) async {
|
||||||
transactionStatus = '';
|
transactionStatus = '';
|
||||||
final fromPubkey = await sdk.api.account.decodeAddress([fromAddress]);
|
|
||||||
final int amountUnit = (amount * 100).toInt();
|
final int amountUnit = (amount * 100).toInt();
|
||||||
|
|
||||||
final sender = TxSenderData(
|
final sender = await _setSender(fromAddress);
|
||||||
fromAddress,
|
|
||||||
fromPubkey!.keys.first,
|
|
||||||
);
|
|
||||||
|
|
||||||
final globalBalance = await getBalance(fromAddress);
|
final globalBalance = await getBalance(fromAddress);
|
||||||
TxInfoData txInfo;
|
TxInfoData txInfo;
|
||||||
|
@ -761,29 +788,9 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
return await _executeCall(txInfo, txOptions, password, rawParams);
|
return await _executeCall(txInfo, txOptions, password, rawParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Future claimUDs(String password) async {
|
|
||||||
// final sender = TxSenderData(
|
|
||||||
// keyring.current.address,
|
|
||||||
// keyring.current.pubKey,
|
|
||||||
// );
|
|
||||||
|
|
||||||
// final txInfo = TxInfoData(
|
|
||||||
// 'universalDividend',
|
|
||||||
// 'claimUds',
|
|
||||||
// sender,
|
|
||||||
// );
|
|
||||||
|
|
||||||
// return await executeCall(txInfo, [], password);
|
|
||||||
// }
|
|
||||||
|
|
||||||
Future<String> confirmIdentity(
|
Future<String> confirmIdentity(
|
||||||
String fromAddress, String name, String password) async {
|
String fromAddress, String name, String password) async {
|
||||||
final fromPubkey = await sdk.api.account.decodeAddress([fromAddress]);
|
final sender = await _setSender(fromAddress);
|
||||||
|
|
||||||
final sender = TxSenderData(
|
|
||||||
fromAddress,
|
|
||||||
fromPubkey!.keys.first,
|
|
||||||
);
|
|
||||||
|
|
||||||
final txInfo = TxInfoData(
|
final txInfo = TxInfoData(
|
||||||
'identity',
|
'identity',
|
||||||
|
@ -803,11 +810,7 @@ class SubstrateSdk with ChangeNotifier {
|
||||||
required Map fromBalance,
|
required Map fromBalance,
|
||||||
bool withBalance = false}) async {
|
bool withBalance = false}) async {
|
||||||
transactionStatus = '';
|
transactionStatus = '';
|
||||||
final fromPubkey = await sdk.api.account.decodeAddress([fromAddress]);
|
final sender = await _setSender(fromAddress);
|
||||||
final sender = TxSenderData(
|
|
||||||
fromAddress,
|
|
||||||
fromPubkey!.keys.first,
|
|
||||||
);
|
|
||||||
|
|
||||||
TxInfoData txInfo;
|
TxInfoData txInfo;
|
||||||
List txOptions = [];
|
List txOptions = [];
|
||||||
|
@ -870,22 +873,31 @@ newKeySig: $newKeySig""");
|
||||||
|
|
||||||
Future revokeIdentity(String address, String password) async {
|
Future revokeIdentity(String address, String password) async {
|
||||||
final idtyIndex = await _getIdentityIndexOf(address);
|
final idtyIndex = await _getIdentityIndexOf(address);
|
||||||
|
final sender = await _setSender(address);
|
||||||
|
|
||||||
final sender = TxSenderData(
|
final prefix = 'revo'.codeUnits;
|
||||||
keyring.current.address,
|
final genesisHashString = await getGenesisHash();
|
||||||
keyring.current.pubKey,
|
final genesisHash = HEX.decode(genesisHashString.substring(2)) as Uint8List;
|
||||||
);
|
final idtyIndexBytes = _int32bytes(idtyIndex);
|
||||||
|
// final pubkey = await addressToPubkey(address);
|
||||||
|
// final pubkeyHexa = '0x${HEX.encode(pubkey)}';
|
||||||
|
final messageToSign =
|
||||||
|
Uint8List.fromList(prefix + genesisHash + idtyIndexBytes);
|
||||||
|
final revocationSig =
|
||||||
|
(await _signMessage(messageToSign, address, password)).substring(2);
|
||||||
|
final revocationSigTyped = '0x01$revocationSig';
|
||||||
|
|
||||||
TxInfoData txInfo;
|
final txInfo = TxInfoData(
|
||||||
|
'identity',
|
||||||
txInfo = TxInfoData(
|
'revokeIdentity',
|
||||||
'membership',
|
|
||||||
'revokeMembership',
|
|
||||||
sender,
|
sender,
|
||||||
);
|
);
|
||||||
|
|
||||||
final txOptions = [idtyIndex];
|
log.d('''DEBUGG: messageToSign: $messageToSign
|
||||||
|
revocationSig: $revocationSig
|
||||||
|
revocationSigTyped: $revocationSigTyped''');
|
||||||
|
|
||||||
|
final txOptions = [idtyIndex, address, revocationSigTyped];
|
||||||
return await _executeCall(txInfo, txOptions, password);
|
return await _executeCall(txInfo, txOptions, password);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -427,7 +427,7 @@ class WalletOptionsProvider with ChangeNotifier {
|
||||||
return canValidateNameBool;
|
return canValidateNameBool;
|
||||||
}
|
}
|
||||||
|
|
||||||
void reloadBuild() {
|
void reload() {
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ class HomeScreen extends StatelessWidget {
|
||||||
await chestBox.clear();
|
await chestBox.clear();
|
||||||
await configBox.delete('defaultWallet');
|
await configBox.delete('defaultWallet');
|
||||||
await sub.deleteAllAccounts();
|
await sub.deleteAllAccounts();
|
||||||
myWalletProvider.rebuildWidget();
|
myWalletProvider.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
// var connectivityResult =
|
// var connectivityResult =
|
||||||
|
|
|
@ -119,7 +119,7 @@ class _ChooseChestState extends State<ChooseChest> {
|
||||||
myWalletProvider.pinCode = '';
|
myWalletProvider.pinCode = '';
|
||||||
WalletData? defaultWallet =
|
WalletData? defaultWallet =
|
||||||
myWalletProvider.getDefaultWallet();
|
myWalletProvider.getDefaultWallet();
|
||||||
myWalletProvider.rebuildWidget();
|
myWalletProvider.reload();
|
||||||
|
|
||||||
await Navigator.push(
|
await Navigator.push(
|
||||||
context,
|
context,
|
||||||
|
|
|
@ -125,7 +125,7 @@ class ChooseWalletScreen extends StatelessWidget {
|
||||||
key: keySelectThisWallet(repository.address!),
|
key: keySelectThisWallet(repository.address!),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
selectedWallet = repository;
|
selectedWallet = repository;
|
||||||
myWalletProvider.rebuildWidget();
|
myWalletProvider.reload();
|
||||||
},
|
},
|
||||||
child: ClipOvalShadow(
|
child: ClipOvalShadow(
|
||||||
shadow: const Shadow(
|
shadow: const Shadow(
|
||||||
|
@ -202,7 +202,7 @@ class ChooseWalletScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
selectedWallet = repository;
|
selectedWallet = repository;
|
||||||
myWalletProvider.rebuildWidget();
|
myWalletProvider.reload();
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
]),
|
]),
|
||||||
|
|
|
@ -1,9 +1,18 @@
|
||||||
|
// ignore_for_file: use_build_context_synchronously
|
||||||
|
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:gecko/globals.dart';
|
import 'package:gecko/globals.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:gecko/models/wallet_data.dart';
|
||||||
import 'package:gecko/models/widgets_keys.dart';
|
import 'package:gecko/models/widgets_keys.dart';
|
||||||
|
import 'package:gecko/providers/my_wallets.dart';
|
||||||
|
import 'package:gecko/providers/substrate_sdk.dart';
|
||||||
|
import 'package:gecko/screens/common_elements.dart';
|
||||||
import 'package:gecko/screens/myWallets/migrate_identity.dart';
|
import 'package:gecko/screens/myWallets/migrate_identity.dart';
|
||||||
|
import 'package:gecko/screens/myWallets/unlocking_wallet.dart';
|
||||||
|
import 'package:gecko/screens/transaction_in_progress.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
// import 'package:gecko/models/wallet_data.dart';
|
// import 'package:gecko/models/wallet_data.dart';
|
||||||
// import 'package:gecko/providers/my_wallets.dart';
|
// import 'package:gecko/providers/my_wallets.dart';
|
||||||
// import 'package:gecko/providers/substrate_sdk.dart';
|
// import 'package:gecko/providers/substrate_sdk.dart';
|
||||||
|
@ -19,7 +28,7 @@ class ManageMembership extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||||
// HomeProvider _homeProvider = Provider.of<HomeProvider>(context);
|
final sub = Provider.of<SubstrateSdk>(context);
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: backgroundColor,
|
backgroundColor: backgroundColor,
|
||||||
|
@ -34,7 +43,41 @@ class ManageMembership extends StatelessWidget {
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
migrateIdentity(context),
|
migrateIdentity(context),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
revokeMyIdentity(context)
|
FutureBuilder(
|
||||||
|
future: sub.isSmithGet(address),
|
||||||
|
builder: (BuildContext context, AsyncSnapshot<bool> isSmith) {
|
||||||
|
if (isSmith.data ?? false) {
|
||||||
|
return SizedBox(
|
||||||
|
height: 70,
|
||||||
|
child: Row(
|
||||||
|
children: <Widget>[
|
||||||
|
const SizedBox(width: 20),
|
||||||
|
Image.asset(
|
||||||
|
'assets/skull_Icon.png',
|
||||||
|
color: Colors.grey[500],
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
const SizedBox(width: 16),
|
||||||
|
Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text('revokeMyIdentity'.tr(),
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
color: Colors.grey[500])),
|
||||||
|
const SizedBox(height: 5),
|
||||||
|
Text("youCannotRevokeThisIdentity".tr(),
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
color: Colors.grey[500])),
|
||||||
|
]),
|
||||||
|
],
|
||||||
|
));
|
||||||
|
} else {
|
||||||
|
return revokeMyIdentity(context);
|
||||||
|
}
|
||||||
|
})
|
||||||
// const SizedBox(height: 20),
|
// const SizedBox(height: 20),
|
||||||
]),
|
]),
|
||||||
));
|
));
|
||||||
|
@ -68,43 +111,46 @@ class ManageMembership extends StatelessWidget {
|
||||||
key: keyRevokeIdty,
|
key: keyRevokeIdty,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
// TODOO: Generate revoke document, and understand extrinsic identity.revokeIdentity options
|
// TODOO: Generate revoke document, and understand extrinsic identity.revokeIdentity options
|
||||||
// final _answer = await confirmPopup(context,
|
final answer = await confirmPopup(context,
|
||||||
// 'Êtes-vous certains de vouloir révoquer définitivement cette identité ?') ??
|
'Êtes-vous certains de vouloir révoquer définitivement cette identité ?') ??
|
||||||
// false;
|
false;
|
||||||
|
|
||||||
// if (_answer) {
|
if (answer) {
|
||||||
// MyWalletsProvider _myWalletProvider =
|
MyWalletsProvider myWalletProvider =
|
||||||
// Provider.of<MyWalletsProvider>(context, listen: false);
|
Provider.of<MyWalletsProvider>(context, listen: false);
|
||||||
// SubstrateSdk _sub = Provider.of<SubstrateSdk>(context, listen: false);
|
SubstrateSdk sub = Provider.of<SubstrateSdk>(context, listen: false);
|
||||||
|
|
||||||
// MyWalletsProvider _mw = MyWalletsProvider();
|
// MyWalletsProvider mw = MyWalletsProvider();
|
||||||
// final _wallet = _mw.getWalletDataByAddress(address);
|
// final wallet = mw.getWalletDataByAddress(address);
|
||||||
// await _sub.setCurrentWallet(_wallet!);
|
// await sub.setCurrentWallet(wallet!);
|
||||||
|
|
||||||
// WalletData? defaultWallet = _myWalletProvider.getDefaultWallet();
|
WalletData? defaultWallet = myWalletProvider.getDefaultWallet();
|
||||||
// String? _pin;
|
String? pin;
|
||||||
// if (_myWalletProvider.pinCode == '') {
|
if (myWalletProvider.pinCode == '') {
|
||||||
// _pin = await Navigator.push(
|
pin = await Navigator.push(
|
||||||
// context,
|
context,
|
||||||
// MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
// builder: (homeContext) {
|
builder: (homeContext) {
|
||||||
// return UnlockingWallet(wallet: defaultWallet);
|
return UnlockingWallet(wallet: defaultWallet);
|
||||||
// },
|
},
|
||||||
// ),
|
),
|
||||||
// );
|
);
|
||||||
// }
|
}
|
||||||
// if (_pin != null || _myWalletProvider.pinCode != '') {
|
if (pin != null || myWalletProvider.pinCode != '') {
|
||||||
// _sub.revokeIdentity(address, _myWalletProvider.pinCode);
|
sub.revokeIdentity(address, myWalletProvider.pinCode);
|
||||||
// }
|
}
|
||||||
// Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
|
|
||||||
// Navigator.push(
|
Navigator.push(
|
||||||
// context,
|
context,
|
||||||
// MaterialPageRoute(builder: (context) {
|
MaterialPageRoute(builder: (context) {
|
||||||
// return const TransactionInProgress(transType: 'revokeIdty');
|
return TransactionInProgress(
|
||||||
// }),
|
transType: 'revokeIdty',
|
||||||
// );
|
fromAddress: getShortPubkey(address),
|
||||||
// }
|
toAddress: getShortPubkey(address));
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 60,
|
height: 60,
|
||||||
|
|
|
@ -244,7 +244,7 @@ class UnlockingWallet extends StatelessWidget {
|
||||||
.shake); // Triggering error shake animation
|
.shake); // Triggering error shake animation
|
||||||
pinColor = Colors.red[600];
|
pinColor = Colors.red[600];
|
||||||
myWalletProvider.pinCode = myWalletProvider.mnemonic = '';
|
myWalletProvider.pinCode = myWalletProvider.mnemonic = '';
|
||||||
walletOptions.reloadBuild();
|
walletOptions.reload();
|
||||||
pinFocus.requestFocus();
|
pinFocus.requestFocus();
|
||||||
} else {
|
} else {
|
||||||
pinColor = Colors.green[400];
|
pinColor = Colors.green[400];
|
||||||
|
|
|
@ -54,7 +54,7 @@ class WalletOptions extends StatelessWidget {
|
||||||
onWillPop: () {
|
onWillPop: () {
|
||||||
walletOptions.isEditing = false;
|
walletOptions.isEditing = false;
|
||||||
walletOptions.isBalanceBlur = false;
|
walletOptions.isBalanceBlur = false;
|
||||||
myWalletProvider.rebuildWidget();
|
myWalletProvider.reload();
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
return Future<bool>.value(true);
|
return Future<bool>.value(true);
|
||||||
},
|
},
|
||||||
|
@ -69,7 +69,7 @@ class WalletOptions extends StatelessWidget {
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
walletOptions.isEditing = false;
|
walletOptions.isEditing = false;
|
||||||
walletOptions.isBalanceBlur = false;
|
walletOptions.isBalanceBlur = false;
|
||||||
myWalletProvider.rebuildWidget();
|
myWalletProvider.reload();
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
}),
|
}),
|
||||||
title: SizedBox(
|
title: SizedBox(
|
||||||
|
@ -245,7 +245,7 @@ class WalletOptions extends StatelessWidget {
|
||||||
wallet.imageCustomPath = newPath;
|
wallet.imageCustomPath = newPath;
|
||||||
walletBox.put(wallet.key, wallet);
|
walletBox.put(wallet.key, wallet);
|
||||||
}
|
}
|
||||||
walletProvider.reloadBuild();
|
walletProvider.reload();
|
||||||
},
|
},
|
||||||
child: wallet.imageCustomPath == null || wallet.imageCustomPath == ''
|
child: wallet.imageCustomPath == null || wallet.imageCustomPath == ''
|
||||||
? Image.asset(
|
? Image.asset(
|
||||||
|
@ -273,7 +273,7 @@ class WalletOptions extends StatelessWidget {
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
wallet.imageCustomPath = await (walletProvider.changeAvatar());
|
wallet.imageCustomPath = await (walletProvider.changeAvatar());
|
||||||
walletProvider.reloadBuild();
|
walletProvider.reload();
|
||||||
},
|
},
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
'assets/walletOptions/camera.png',
|
'assets/walletOptions/camera.png',
|
||||||
|
@ -521,8 +521,8 @@ class WalletOptions extends StatelessWidget {
|
||||||
// defaultWallet = wallet;
|
// defaultWallet = wallet;
|
||||||
await sub.setCurrentWallet(wallet);
|
await sub.setCurrentWallet(wallet);
|
||||||
myWalletProvider.readAllWallets(currentChest);
|
myWalletProvider.readAllWallets(currentChest);
|
||||||
myWalletProvider.rebuildWidget();
|
myWalletProvider.reload();
|
||||||
walletOptions.reloadBuild();
|
walletOptions.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget deleteWallet(BuildContext context,
|
Widget deleteWallet(BuildContext context,
|
||||||
|
@ -556,7 +556,7 @@ class WalletOptions extends StatelessWidget {
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
myWalletProvider.listWallets =
|
myWalletProvider.listWallets =
|
||||||
myWalletProvider.readAllWallets(currentChest);
|
myWalletProvider.readAllWallets(currentChest);
|
||||||
myWalletProvider.rebuildWidget();
|
myWalletProvider.reload();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
: null,
|
: null,
|
||||||
|
|
|
@ -224,7 +224,7 @@ class OnboardingStepTen extends StatelessWidget {
|
||||||
await walletBox.add(myWallet);
|
await walletBox.add(myWallet);
|
||||||
}
|
}
|
||||||
myWalletProvider.readAllWallets(currentChest);
|
myWalletProvider.readAllWallets(currentChest);
|
||||||
myWalletProvider.rebuildWidget();
|
myWalletProvider.reload();
|
||||||
|
|
||||||
generateWalletProvider.generatedMnemonic = '';
|
generateWalletProvider.generatedMnemonic = '';
|
||||||
myWalletProvider.resetPinCode();
|
myWalletProvider.resetPinCode();
|
||||||
|
@ -239,7 +239,7 @@ class OnboardingStepTen extends StatelessWidget {
|
||||||
.shake); // Triggering error shake animation
|
.shake); // Triggering error shake animation
|
||||||
hasError = true;
|
hasError = true;
|
||||||
pinColor = Colors.red[600];
|
pinColor = Colors.red[600];
|
||||||
walletOptions.reloadBuild();
|
walletOptions.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
|
|
|
@ -57,7 +57,7 @@ class SearchScreen extends StatelessWidget {
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
onChanged: (v) => searchProvider.rebuildWidget(),
|
onChanged: (v) => searchProvider.reload(),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor: Colors.white,
|
fillColor: Colors.white,
|
||||||
|
|
|
@ -594,7 +594,7 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
FilteringTextInputFormatter.allow(
|
FilteringTextInputFormatter.allow(
|
||||||
RegExp(r'(^\d+\.?\d{0,2})')),
|
RegExp(r'(^\d+\.?\d{0,2})')),
|
||||||
],
|
],
|
||||||
// onChanged: (v) => _searchProvider.rebuildWidget(),
|
// onChanged: (v) => _searchProvider.reload(),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: '0.00',
|
hintText: '0.00',
|
||||||
suffix: Text(currencyName),
|
suffix: Text(currencyName),
|
||||||
|
|
Loading…
Reference in New Issue