diff --git a/app/lib/helpers/login_helpers.dart b/app/lib/helpers/login_helpers.dart index cc4545ab9..5510069ec 100644 --- a/app/lib/helpers/login_helpers.dart +++ b/app/lib/helpers/login_helpers.dart @@ -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); } diff --git a/app/lib/widgets/preference_dialog.dart b/app/lib/widgets/preference_dialog.dart index 6e70307ad..c9c592a00 100644 --- a/app/lib/widgets/preference_dialog.dart +++ b/app/lib/widgets/preference_dialog.dart @@ -69,10 +69,9 @@ class _PreferenceDialogState extends State { widget.appId!, jsonEncode(previousScopePermissionsObject)); } - previousSelectedScope = - (previousScopePermissionsObject == null) ? scopeAsMap : previousScopePermissionsObject; + previousSelectedScope = previousScopePermissionsObject; } else { - await savePreviousScopePermissions(widget.appId!, null); + await savePreviousScopePermissions(widget.appId!, '{}'); } } @@ -502,7 +501,7 @@ class _PreferenceDialogState extends State { 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( @@ -545,65 +544,63 @@ class _PreferenceDialogState extends State { )); } - 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( - 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( + items: _menuItems, + value: _selectedItem, + onChanged: (value) { + setState(() { + toggleScope('walletAddressData', value); + _selectedItem = value!; + }); + }), + )) + ], + ) + ], + ), + ); return Container(); }); break; diff --git a/app/pubspec.yaml b/app/pubspec.yaml index e5b5d21a3..7444d9a98 100644 --- a/app/pubspec.yaml +++ b/app/pubspec.yaml @@ -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"