Skip to content
Open
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
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ You can add accounts to a wallet by:

---

### 5. App Upgrade System
- Automatic update detection – Prompts users to install the latest version directly from within the app.
- Cross-platform support – Works on Android, iOS.
- Custom appcast feed – Fetches release information from a hosted `appcast.xml`.
- Powered by: [Upgrader](https://pub.dev/packages/upgrader)

---

## RPC Communication

Qubic Wallet interacts with the network using the following RPC endpoints:
Expand Down
7 changes: 7 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,11 @@
android:name="flutterEmbedding"
android:value="2" />
</application>
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
</intent>
</queries>
</manifest>
1 change: 0 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ Future<void> main() async {
PackageInfo packageInfo = await PackageInfo.fromPlatform();
getIt.get<SettingsStore>().setVersion(packageInfo.version);
getIt.get<SettingsStore>().setBuildNumber(packageInfo.buildNumber);

getIt.get<ApplicationStore>().checkWalletIsInitialized();
} catch (e) {
appLogger.e(e.toString());
Expand Down
74 changes: 50 additions & 24 deletions lib/pages/main/main_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import 'package:qubic_wallet/l10n/l10n.dart';
import 'package:qubic_wallet/models/app_link/app_link_controller.dart';
import 'package:qubic_wallet/models/wallet_connect/wallet_connect_modals_controller.dart';
import 'package:qubic_wallet/pages/main/download_cmd_utils.dart';
import 'package:qubic_wallet/pages/main/tab_dapps/tab_dapps.dart';
import 'package:qubic_wallet/pages/main/tab_settings/tab_settings.dart';
import 'package:qubic_wallet/pages/main/tab_wallet_contents.dart';
import 'package:qubic_wallet/pages/main/tab_dapps/tab_dapps.dart';
import 'package:qubic_wallet/pages/main/wallet_contents/add_account_modal_bottom_sheet.dart';
import 'package:qubic_wallet/resources/qubic_cmd.dart';
import 'package:qubic_wallet/services/wallet_connect_service.dart';
Expand All @@ -28,6 +28,8 @@ import 'package:qubic_wallet/stores/settings_store.dart';
import 'package:qubic_wallet/styles/text_styles.dart';
import 'package:qubic_wallet/timed_controller.dart';
import 'package:universal_platform/universal_platform.dart';
import 'package:upgrader/upgrader.dart';
import 'package:version/version.dart';

class MainScreen extends StatefulWidget {
final int initialTabIndex;
Expand Down Expand Up @@ -157,7 +159,8 @@ class _MainScreenState extends State<MainScreen> with WidgetsBindingObserver {
if (error != "") {
//Error overriding for more than max accounts in wallet
if (error == "Failed to perform action. Server returned status 400") {
if (applicationStore.currentQubicIDs.length > Config.maxAccountsInWallet) {
if (applicationStore.currentQubicIDs.length >
Config.maxAccountsInWallet) {
return;
}
}
Expand Down Expand Up @@ -298,34 +301,57 @@ class _MainScreenState extends State<MainScreen> with WidgetsBindingObserver {
];
}

UpgraderStore _buildAppCastStore() {
const url =
'https://raw.githubusercontent.com/ahmed-tarek-salem/qubic-appcast-test/refs/heads/main/appcast.xml?v=2';
final version = getIt.get<SettingsStore>().versionInfo ?? '1.0.0';
return UpgraderAppcastStore(
appcastURL: url,
osVersion: Version.parse(version),
);
}

Widget getMain() {
final upgrader = Upgrader(
//TODO remove debugDisplayAlways and debugLogging when done
debugDisplayAlways: true,
debugLogging: true,
storeController: UpgraderStoreController(
onAndroid: _buildAppCastStore,
oniOS: _buildAppCastStore,
),
);
if (applicationStore.hasStoredWalletSettings) {
_controller.jumpToTab(applicationStore.currentTabIndex);
} else {
_controller.jumpToTab(0);
}
// _controller.jumpToPreviousTab();
return PersistentTabView(
controller: _controller,
navBarHeight: 60,
navBarBuilder: (navBarConfig) => Style1BottomNavBar(
navBarConfig: navBarConfig,
navBarDecoration: const NavBarDecoration(
border: Border(
top: BorderSide(width: 1, color: LightThemeColors.navBorder),
),
color: LightThemeColors.background)),

tabs: _tabs(),

backgroundColor: LightThemeColors.background,

// Default is Colors.white.
handleAndroidBackButtonPress: true, // Default is true.
navBarOverlap: const NavBarOverlap.none(),
resizeToAvoidBottomInset:
true, // This needs to be true if you want to move up the screen when keyboard appears. Default is true.
stateManagement: true, // Default is true.
return UpgradeAlert(
upgrader: upgrader,
showIgnore: false,
dialogStyle: UpgradeDialogStyle.material,
child: PersistentTabView(
controller: _controller,
navBarHeight: 60,
navBarBuilder: (navBarConfig) => Style1BottomNavBar(
navBarConfig: navBarConfig,
navBarDecoration: const NavBarDecoration(
border: Border(
top: BorderSide(width: 1, color: LightThemeColors.navBorder),
),
color: LightThemeColors.background)),

tabs: _tabs(),

backgroundColor: LightThemeColors.background,

// Default is Colors.white.
handleAndroidBackButtonPress: true, // Default is true.
navBarOverlap: const NavBarOverlap.none(),
resizeToAvoidBottomInset:
true, // This needs to be true if you want to move up the screen when keyboard appears. Default is true.
stateManagement: true, // Default is true.
),
);
}

Expand Down
2 changes: 2 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ dependencies:
safe_device: ^1.2.1
cryptography: ^2.7.0
no_screenshot: ^0.3.1
upgrader: ^12.1.0
version: ^3.0.0
implicitly_animated_list: ^2.3.0
cached_network_image: ^3.4.1

Expand Down