Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions app/lib/helpers/login_helpers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ void addDigitalTwinToBackend(Uint8List derivedSeed, String appId) async {
KeyPair dtKeyPair = await generateKeyPairFromEntropy(derivedSeed);
String dtEncodedPublicKey = base64.encode(dtKeyPair.pk);

print("Derived Seed: " + base64.encode(derivedSeed));
print("Username: " + doubleName!);
print("Public key: " + dtEncodedPublicKey);

addDigitalTwinDerivedPublicKeyToBackend(doubleName, dtEncodedPublicKey, appId);
}

Expand Down
121 changes: 59 additions & 62 deletions app/lib/widgets/preference_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,9 @@ class _PreferenceDialogState extends State<PreferenceDialog> {
widget.appId!, jsonEncode(previousScopePermissionsObject));
}

previousSelectedScope =
(previousScopePermissionsObject == null) ? scopeAsMap : previousScopePermissionsObject;
previousSelectedScope = previousScopePermissionsObject;
} else {
await savePreviousScopePermissions(widget.appId!, null);
await savePreviousScopePermissions(widget.appId!, '{}');
}
}

Expand Down Expand Up @@ -502,7 +501,7 @@ class _PreferenceDialogState extends State<PreferenceDialog> {
return FutureBuilder(
future: getWallets(),
builder: (BuildContext context, AsyncSnapshot snapshot) {
if (!snapshot.hasData) {
if (!snapshot.hasData || snapshot.data.length == 0) {
return Container(
decoration: BoxDecoration(
border: Border(
Expand Down Expand Up @@ -545,65 +544,63 @@ class _PreferenceDialogState extends State<PreferenceDialog> {
));
}

if (wallets != null) {
return Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 0.5,
)),
),
constraints: BoxConstraints(
minWidth: MediaQuery.of(context).size.width * 0.8,
maxWidth: MediaQuery.of(context).size.width * 0.8),
child: Column(
children: [
Row(
children: [
Flexible(
child: CheckboxListTile(
value: (previousSelectedScope[scopeItem] == null)
? mandatory
: previousSelectedScope[scopeItem],
onChanged: ((mandatory == true)
? null
: (value) {
toggleScope(scopeItem, value);
}),
title: Text(
"${scopeItem.toUpperCase()}" +
(mandatory ? " *" : ""),
style: TextStyle(
fontWeight: FontWeight.bold, color: Colors.black),
),
))
],
),
Row(
children: [
Padding(
padding: EdgeInsets.only(left: 16),
return Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 0.5,
)),
),
constraints: BoxConstraints(
minWidth: MediaQuery.of(context).size.width * 0.8,
maxWidth: MediaQuery.of(context).size.width * 0.8),
child: Column(
children: [
Row(
children: [
Flexible(
child: CheckboxListTile(
value: (previousSelectedScope[scopeItem] == null)
? mandatory
: previousSelectedScope[scopeItem],
onChanged: ((mandatory == true)
? null
: (value) {
toggleScope(scopeItem, value);
}),
title: Text(
"${scopeItem.toUpperCase()}" +
(mandatory ? " *" : ""),
style: TextStyle(
fontWeight: FontWeight.bold, color: Colors.black),
),
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: ButtonTheme(
child: DropdownButton<String>(
items: _menuItems,
value: _selectedItem,
onChanged: (value) {
setState(() {
toggleScope('walletAddressData', value);
_selectedItem = value!;
});
}),
))
],
)
],
),
);
}
))
],
),
Row(
children: [
Padding(
padding: EdgeInsets.only(left: 16),
),
Container(
width: MediaQuery.of(context).size.width * 0.8,
child: ButtonTheme(
child: DropdownButton<String>(
items: _menuItems,
value: _selectedItem,
onChanged: (value) {
setState(() {
toggleScope('walletAddressData', value);
_selectedItem = value!;
});
}),
))
],
)
],
),
);
return Container();
});
break;
Expand Down
2 changes: 1 addition & 1 deletion app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A decentralized login application

publish_to: "none"

version: 3.5.0+157
version: 3.5.0+158

environment:
sdk: ">=2.12.0<3.0.0"
Expand Down