fix revocation payload
This commit is contained in:
parent
e752de474d
commit
3825bf0488
|
@ -1,6 +1,5 @@
|
||||||
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: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 'general_actions.dart';
|
||||||
|
@ -10,7 +9,7 @@ void main() async {
|
||||||
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
|
||||||
await dotenv.load();
|
await dotenv.load();
|
||||||
|
|
||||||
testWidgets('Certifications state', (testerLoc) async {
|
testWidgets('Identity revocation', (testerLoc) async {
|
||||||
tester = testerLoc;
|
tester = testerLoc;
|
||||||
// Connect local node and import test chest in background
|
// Connect local node and import test chest in background
|
||||||
await bkFastStart();
|
await bkFastStart();
|
||||||
|
@ -19,13 +18,13 @@ void main() async {
|
||||||
await firstOpenChest();
|
await firstOpenChest();
|
||||||
|
|
||||||
// Revoke test3
|
// Revoke test3
|
||||||
await spawnBlock(number: 5);
|
await spawnBlock();
|
||||||
await tapKey(keyOpenWallet(test3.address));
|
await tapKey(keyOpenWallet(test3.address));
|
||||||
await tapKey(keyManageMembership);
|
await tapKey(keyManageMembership);
|
||||||
await tapKey(keyRevokeIdty);
|
await tapKey(keyRevokeIdty);
|
||||||
await tapKey(keyConfirm);
|
await tapKey(keyConfirm);
|
||||||
spawnBlock(duration: 2000);
|
spawnBlock(duration: 2000);
|
||||||
await waitFor('validé !', timeout: const Duration(seconds: 1));
|
await waitFor('validé !', timeout: const Duration(seconds: 4));
|
||||||
await tapKey(keyCloseTransactionScreen, duration: 0);
|
await tapKey(keyCloseTransactionScreen, duration: 0);
|
||||||
await waitFor('Membre validé !', reverse: true);
|
await waitFor('Membre validé !', reverse: true);
|
||||||
}, timeout: testTimeout());
|
}, timeout: testTimeout());
|
||||||
|
|
|
@ -851,8 +851,9 @@ newKeySig: $newKeySig""");
|
||||||
final genesisHash = HEX.decode(genesisHashString.substring(2)) as Uint8List;
|
final genesisHash = HEX.decode(genesisHashString.substring(2)) as Uint8List;
|
||||||
final idtyIndexBytes = _int32bytes(idtyIndex);
|
final idtyIndexBytes = _int32bytes(idtyIndex);
|
||||||
// final pubkey = await addressToPubkey(address);
|
// final pubkey = await addressToPubkey(address);
|
||||||
|
// final pubkeyHexa = '0x${HEX.encode(pubkey)}';
|
||||||
final messageToSign =
|
final messageToSign =
|
||||||
Uint8List.fromList(prefix + idtyIndexBytes + genesisHash);
|
Uint8List.fromList(prefix + genesisHash + idtyIndexBytes);
|
||||||
final revocationSig = await _signMessage(messageToSign, address, password);
|
final revocationSig = await _signMessage(messageToSign, address, password);
|
||||||
|
|
||||||
final txInfo = TxInfoData(
|
final txInfo = TxInfoData(
|
||||||
|
@ -861,6 +862,9 @@ newKeySig: $newKeySig""");
|
||||||
sender,
|
sender,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
log.d('''DEBUGG: messageToSign: $messageToSign
|
||||||
|
revocationSig: $revocationSig''');
|
||||||
|
|
||||||
final txOptions = [idtyIndex, address, revocationSig];
|
final txOptions = [idtyIndex, address, revocationSig];
|
||||||
return await _executeCall(txInfo, txOptions, password);
|
return await _executeCall(txInfo, txOptions, password);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue