diff --git a/LabelStoreMax/CHANGELOG.md b/LabelStoreMax/CHANGELOG.md index 3bad642..9511468 100644 --- a/LabelStoreMax/CHANGELOG.md +++ b/LabelStoreMax/CHANGELOG.md @@ -1,3 +1,8 @@ +## [6.8.1] - 2023-07-03 + +* Fix auth bug. +* Pubspec.yaml dependency updates. + ## [6.8.0] - 2023-07-03 * UI fixes. diff --git a/LabelStoreMax/lib/bootstrap/helpers.dart b/LabelStoreMax/lib/bootstrap/helpers.dart index 98f4a17..340827f 100644 --- a/LabelStoreMax/lib/bootstrap/helpers.dart +++ b/LabelStoreMax/lib/bootstrap/helpers.dart @@ -48,7 +48,7 @@ import 'package:flutter/services.dart' show rootBundle; Future getUser() async => (await (NyStorage.read(SharedKey.authUser))); -Future appWooSignal(Function(WooSignal) api) async { +Future appWooSignal(Function(WooSignal api) api) async { return await api(WooSignal.instance); } diff --git a/LabelStoreMax/lib/resources/pages/account_landing_page.dart b/LabelStoreMax/lib/resources/pages/account_landing_page.dart index 4ee9762..5190535 100644 --- a/LabelStoreMax/lib/resources/pages/account_landing_page.dart +++ b/LabelStoreMax/lib/resources/pages/account_landing_page.dart @@ -226,7 +226,7 @@ class _AccountLandingPageState extends NyState { String? token = wpUserLoginResponse.data!.userToken; String userId = wpUserLoginResponse.data!.userId.toString(); User user = User.fromUserAuthResponse(token: token, userId: userId); - await Auth.set(user, key: SharedKey.authUser); + await user.save(SharedKey.authUser); showToastNotification(context, title: trans("Hello"), diff --git a/LabelStoreMax/lib/resources/pages/account_register_page.dart b/LabelStoreMax/lib/resources/pages/account_register_page.dart index eaa433d..64c045b 100644 --- a/LabelStoreMax/lib/resources/pages/account_register_page.dart +++ b/LabelStoreMax/lib/resources/pages/account_register_page.dart @@ -236,7 +236,7 @@ class _AccountRegistrationPageState extends NyState { String? token = wpUserRegisterResponse.data!.userToken; String userId = wpUserRegisterResponse.data!.userId.toString(); User user = User.fromUserAuthResponse(token: token, userId: userId); - await Auth.set(user, key: SharedKey.authUser); + await user.save(SharedKey.authUser); await WPJsonAPI.instance.api((request) => request.wpUpdateUserInfo(token, firstName: firstName, lastName: lastName)); diff --git a/LabelStoreMax/pubspec.lock b/LabelStoreMax/pubspec.lock index 3dffc04..955374e 100644 --- a/LabelStoreMax/pubspec.lock +++ b/LabelStoreMax/pubspec.lock @@ -1142,10 +1142,10 @@ packages: dependency: "direct main" description: name: woosignal - sha256: "2daf353de3ff3e6b2087bf886fc9cd66effc8e78e3e1c71eee755ec978204a6b" + sha256: "5059a0f531149e3bd9ee70a24e76315644663462509c84771d3bb8ca403726ab" url: "https://pub.dev" source: hosted - version: "3.6.1" + version: "3.7.1" wp_json_api: dependency: "direct main" description: diff --git a/LabelStoreMax/pubspec.yaml b/LabelStoreMax/pubspec.yaml index 9aa2916..fd48339 100644 --- a/LabelStoreMax/pubspec.yaml +++ b/LabelStoreMax/pubspec.yaml @@ -1,7 +1,7 @@ # Official WooSignal App Template for WooCommerce # Label StoreMax -# Version: 6.8.0 +# Version: 6.8.1 # Author: Anthony Gordon # Homepage: https://woosignal.com # Documentation: https://woosignal.com/docs/app/label-storemax @@ -30,7 +30,7 @@ dependencies: analyzer: ^5.12.0 intl: ^0.18.0 nylo_framework: ^5.1.1 - woosignal: ^3.6.1 + woosignal: ^3.7.1 wp_json_api: ^3.3.2 cached_network_image: ^3.2.3 package_info_plus: ^4.0.2