feat: Add fiat api and last used wallet type to support chat (#2078)

This commit is contained in:
Konstantin Ullrich
2025-03-11 15:27:50 +02:00
committed by GitHub
parent 1c8af1afae
commit dcde3fd253
4 changed files with 22 additions and 6 deletions
@@ -26,6 +26,8 @@ class SupportChatPage extends BasePage {
secureStorage,
supportUrl: supportViewModel.fetchUrl(authToken: snapshot.data!),
appVersion: supportViewModel.appVersion,
fiatApiMode: supportViewModel.fiatApiMode,
walletType: supportViewModel.walletType,
);
return Container();
},
@@ -11,11 +11,15 @@ class ChatwootWidget extends StatefulWidget {
this.secureStorage, {
required this.supportUrl,
required this.appVersion,
required this.fiatApiMode,
required this.walletType,
});
final SecureStorage secureStorage;
final String supportUrl;
final String appVersion;
final String fiatApiMode;
final String walletType;
@override
ChatwootWidgetState createState() => ChatwootWidgetState();
@@ -43,8 +47,11 @@ class ChatwootWidgetState extends State<ChatwootWidget> {
if (eventType == 'loaded') {
final authToken = parsedMessage["config"]["authToken"];
_storeCookie(authToken as String);
_setCustomAttributes(
controller, {"app_version": widget.appVersion});
_setCustomAttributes(controller, {
"app_version": widget.appVersion,
"fiat_api_mode": widget.fiatApiMode,
"wallet_type": widget.walletType,
});
}
}
},