Skip to content

Commit

Permalink
fix: 🐛 Fix bugs with new url
Browse files Browse the repository at this point in the history
  • Loading branch information
redDwarf03 committed Aug 13, 2024
1 parent 2d20241 commit 8eb37a4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
6 changes: 5 additions & 1 deletion lib/ui/views/main_screen/layouts/app_bar_menu_links.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ class AppBarMenuLinks extends ConsumerWidget {
onPressed: () async {
await launchUrl(
Uri.parse(
(Uri.base.toString().toLowerCase().contains('dex.archethic'))
(Uri.base.toString().toLowerCase().contains('dex.archethic') ||
Uri.base
.toString()
.toLowerCase()
.contains('swap.archethic'))
? 'https://bridge.archethic.net'
: 'https://bridge.testnet.archethic.net',
),
Expand Down
10 changes: 7 additions & 3 deletions lib/ui/views/main_screen/layouts/header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,13 @@ class Header extends ConsumerWidget {
await launchUrl(
Uri.parse(
(Uri.base
.toString()
.toLowerCase()
.contains('dex.archethic'))
.toString()
.toLowerCase()
.contains('dex.archethic') ||
Uri.base
.toString()
.toLowerCase()
.contains('swap.archethic'))
? 'https://bridge.archethic.net'
: 'https://bridge.testnet.archethic.net',
),
Expand Down
3 changes: 2 additions & 1 deletion lib/util/service_locator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ void setupServiceLocator() {
OracleService('https://mainnet.archethic.net', logsActivation: false),
)
..registerLazySingleton<aedappfm.LogManager>(() {
if (Uri.base.toString().toLowerCase().contains('dex.archethic')) {
if (Uri.base.toString().toLowerCase().contains('dex.archethic') ||
Uri.base.toString().toLowerCase().contains('swap.archethic')) {
return aedappfm.LogManager(
url:
'https://faas-lon1-917a94a7.doserverless.co/api/v1/web/fn-279bbae3-a757-4cef-ade7-a63bdaca36f7/default/app-log-mainnet',
Expand Down

0 comments on commit 8eb37a4

Please sign in to comment.