-
Notifications
You must be signed in to change notification settings - Fork 45
feat: Add mobile wallet integration #527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: Add mobile wallet integration #527
Conversation
To view this pull requests documentation preview, visit the following URL: docs.page/focustree/starknet.dart~527 Documentation is deployed and generated using docs.page. |
WalkthroughThis change introduces comprehensive support for mobile wallet integration, specifically enabling communication with the Argent mobile app for contract invoke transactions. It adds new models, provider classes, connector utilities, and UI widgets across the Changes
Sequence Diagram(s)sequenceDiagram
participant DApp as Flutter dApp
participant Service as MobileWalletService
participant Connector as StarknetMobileConnector
participant Wallet as Argent Mobile App
DApp->>Service: Initialize with project metadata
DApp->>Service: Connect to mobile wallet (e.g., Argent)
Service->>Connector: Initiate WalletConnect session
Connector->>Wallet: Launch deep link / QR code
Wallet-->>Connector: Approve connection (session established)
Connector-->>Service: Notify connection established
Service-->>DApp: Update connection state
DApp->>Service: Request contract invoke transaction
Service->>Connector: Send transaction request via WalletConnect
Connector->>Wallet: Request user signature/approval
Wallet-->>Connector: Return signed transaction/approval
Connector-->>Service: Relay transaction result
Service-->>DApp: Notify transaction status
Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Suggested reviewers
Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
please review my PR @ptisserand |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 29
🔭 Outside diff range comments (1)
examples/mobile_wallet_example/README.md (1)
1-17
: 🛠️ Refactor suggestionEnhance README with example‐specific guidance.
The current README only lists generic Flutter resources. Add sections covering:
- Prerequisites (Flutter/Dart versions, channel)
- Setup steps (
flutter pub get
, linking local SDK packages)- Running the example on each platform (Android, iOS, macOS, etc.)
- WalletConnect configuration (project ID, deep‐link setup)
- How to test the mobile wallet flows (QR scan, deep link invocation)
Also link todocs/mobile-wallet-integration.md
for in‐depth API and integration guide.
♻️ Duplicate comments (1)
examples/mobile_wallet_example/macos/RunnerTests/RunnerTests.swift (1)
7-10
: Same note as iOS – add a minimal assertionAdd
XCTAssertTrue(true)
or remove placeholder test to avoid empty-suite warnings.
🧹 Nitpick comments (53)
examples/mobile_wallet_example/linux/.gitignore (1)
1-1
: Consider extending ignore rules for Linux build artifacts.Right now only
flutter/ephemeral
is ignored. You might also want to ignore CMake-generated files and build directories (e.g.,build/
,CMakeFiles/
,Makefile
,*.o
) to keep the repo clean.examples/mobile_wallet_example/macos/Flutter/Flutter-Debug.xcconfig (1)
1-1
: Ensure generated config isn’t committed accidentally.You include
ephemeral/Flutter-Generated.xcconfig
which is auto-generated—make sure you have a.gitignore
inmacos/Flutter/
(or at repo root) to exclude the entireephemeral/
directory.examples/wallet_app/.env (2)
3-5
: Remove extra blank line.
dotenv-linter flags an extra blank line here. Consolidate whitespace to keep the file tidy.Apply this diff:
- - - # New mobile wallet variable🧰 Tools
🪛 dotenv-linter (3.3.0)
[warning] 4-4: [ExtraBlankLine] Extra blank line detected
6-6
: Ensure trailing newline.
Add a blank line at the end of the file to satisfy POSIX and dotenv-linter conventions.Apply this diff:
WALLETCONNECT_PROJECT_ID=your_walletconnect_project_id +
🧰 Tools
🪛 dotenv-linter (3.3.0)
[warning] 6-6: [EndingBlankLine] No blank line at the end of the file
examples/mobile_wallet_example/android/app/src/profile/AndroidManifest.xml (1)
1-7
: Verify manifest merging & package inheritance.
This profile‐specific manifest only declares INTERNET permission without apackage
attribute. Ensure it merges correctly withmain/AndroidManifest.xml
and inherits the samepackage
name. If you need to override or add attributes, consider adding thexmlns:tools
namespace and merge directives (tools:replace
/tools:remove
).examples/mobile_wallet_example/android/gradle.properties (1)
1-3
: Configure JVM memory and AndroidX support
Allocating 8 GB heap, 4 GB metaspace, and 512 MB code cache is suitable for large Flutter modules—consider documenting required system specs for contributors. Enabling AndroidX and Jetifier ensures seamless compatibility with modern Android dependencies.examples/mobile_wallet_example/macos/Runner/Release.entitlements (1)
1-8
: Enable App Sandbox entitlement
The sandboxing entitlement is correctly set. If the mobile wallet integration performs network operations, ensure you add thecom.apple.security.network.client
entitlement.examples/mobile_wallet_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md (1)
1-5
: Document launch image customization
Instructions are clear; for added clarity, include recommended image dimensions and naming conventions (e.g.,[email protected]
,[email protected]
).examples/mobile_wallet_example/windows/.gitignore (1)
1-17
: Enhance Windows ignore patterns
Consider adding build artifact directories (e.g.,build/
,CMakeFiles/
) and Visual Studio project user files (e.g.,*.vcxproj.user
,*.filters
) to this file to avoid checking in generated artifacts.examples/mobile_wallet_example/web/manifest.json (1)
11-33
: Consider adding"any maskable"
purpose or a fallback iconOnly the two icons marked
"purpose": "maskable"
are provided.
On browsers that don’t understand the maskable purpose you may get no icon at all.
Either add a standard"purpose": "any"
variant or set the combined value"any maskable"
:- "purpose": "maskable" + "purpose": "any maskable"This gives full coverage across Chrome, Safari and Firefox PWA installs.
examples/mobile_wallet_example/ios/Runner/Base.lproj/LaunchScreen.storyboard (1)
19-26
: Verify LaunchImage asset and iOS 14+ guidelines
LaunchImage
still uses the legacy static launch image pattern.
Apple recommends a minimal storyboard (already used) without hard-coded bitmaps so the UI adapts to Dark Mode & screen sizes.
If the bitmap isn’t strictly required, consider removing<imageView…>
and relying on the white background + app icon for a lighter binary.examples/mobile_wallet_example/test/widget_test.dart (1)
16-25
: UsepumpAndSettle()
to avoid frame-timing flakes
await tester.pump();
can miss async rebuilds triggered by providers or animations.
Replacing withpumpAndSettle()
makes the test more robust:- await tester.tap(find.byIcon(Icons.add)); - await tester.pump(); + await tester.tap(find.byIcon(Icons.add)); + await tester.pumpAndSettle();examples/mobile_wallet_example/macos/Runner/MainFlutterWindow.swift (2)
5-14
: Callsuper.awakeFromNib()
first to respect Cocoa init orderApple guidelines recommend invoking the superclass implementation at the very start of
awakeFromNib()
.
Doing work before the super call can lead to subtle initialisation issues (e.g. outlet binding, KVO). The fix is trivial:override func awakeFromNib() { - let flutterViewController = FlutterViewController() + super.awakeFromNib() + let flutterViewController = FlutterViewController()Nothing else needs to change.
6-9
: Minor: unnecessary temp variable
let windowFrame = self.frame
is copied immediately back viasetFrame
.
You can inline to reduce noise:self.setFrame(frame, display: true)packages/wallet_kit/lib/widgets/nft_details.g.dart (1)
156-164
: Deprecation notice acknowledgedThe
GetNFTRef
mixin is marked for removal in 3.0; good backward-compat layer.
Remember to open a tracking issue so consumers migrate before the breaking release.examples/mobile_wallet_example/web/index.html (2)
19-34
: Add viewport meta for responsive layoutWithout a
viewport
meta tag, the page may render scaled on some mobile browsers.- <meta name="description" content="A new Flutter project."> + <meta name="description" content="A new Flutter project."> + <meta name="viewport" content="width=device-width, initial-scale=1">
30-37
: Consider CSP & integrity attributesFor production, adding a Content-Security-Policy header and
integrity
/crossorigin
on theflutter_bootstrap.js
script improves security against XSS and supply-chain attacks.
No blocking issues for the demo, but worth adding before release.examples/mobile_wallet_example/ios/RunnerTests/RunnerTests.swift (1)
7-10
: Placeholder test lacks assertions – consider adding a trivial assertion or removing the targetAn empty test method passes but provides no signal of runtime correctness and may trigger “No tests run” warnings in CI.
Either add a no-op assertion (e.g.XCTAssertTrue(true)
) or delete the autogenerated test target until real tests are added.examples/mobile_wallet_example/android/app/build.gradle.kts (1)
8-40
: Placeholder TODOs remain in example config
There are two TODO entries for customizing theapplicationId
and adding a real signing config in the release build. Consider updating or removing these placeholders in the example, or documenting how to fill them in.Would you like me to draft example values or remove these comments?
examples/mobile_wallet_example/android/build.gradle.kts (1)
11-17
: Merge duplicatesubprojects
blocks
You can combine the twosubprojects
declarations into one to reduce duplication:- subprojects { - val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) - project.layout.buildDirectory.value(newSubprojectBuildDir) - } - subprojects { - project.evaluationDependsOn(":app") - } + subprojects { + val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) + project.layout.buildDirectory.value(newSubprojectBuildDir) + project.evaluationDependsOn(":app") + }examples/mobile_wallet_example/ios/.gitignore (1)
1-35
: Add macOS Finder artifacts to .gitignore
Consider ignoring common macOS files like.DS_Store
to keep the repository clean:**/.generated/ Flutter/Generated.xcconfig +*.DS_Store +**/.DS_Storeexamples/mobile_wallet_example/pubspec.yml (1)
1-46
: Fix line-ending & trailing-whitespace lint errors.
yamllint
flags CRLF endings, several trailing spaces (lines 13, 31, 37) and the missing final newline (POSIX compliance). Cleaning these prevents noisy CI failures.+13 ... +31 ... +37 ... -46 weight: 300 +46 weight: 300 +(Replace
␍␍
with nothing; ensure the file is LF-terminated.)🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 1-1: wrong new line character: expected \n
(new-lines)
[error] 13-13: trailing spaces
(trailing-spaces)
[error] 31-31: trailing spaces
(trailing-spaces)
[error] 37-37: trailing spaces
(trailing-spaces)
[error] 46-46: no new line character at the end of file
(new-line-at-end-of-file)
examples/wallet_app/lib/screens/settings_screen.dart (1)
18-44
: Extract repeatedListTile
into a reusable widgetDuplicated styling inflates the file and makes future edits error-prone.
-ListTile( - leading: const Icon(Icons.network_check), - title: const Text('Network'), - ... -), +const _SettingsTile( + icon: Icons.network_check, + title: 'Network', + subtitle: 'Starknet Mainnet', +),Encapsulate in a private
StatelessWidget
(_SettingsTile
) that takesicon
,title
,subtitle
, andonTap
.examples/mobile_wallet_example/windows/runner/Runner.rc (1)
92-99
: Replace placeholder vendor strings with real company identifiers
CompanyName
,ProductName
, etc. are still set to the genericcom.example
.
Leaving placeholders in a production example may cause confusion in downstream projects that copy-paste this file verbatim.- VALUE "CompanyName", "com.example" "\0" - VALUE "LegalCopyright", "Copyright (C) 2025 com.example. All rights reserved." "\0" + VALUE "CompanyName", "Acme Labs Ltd." "\0" + VALUE "LegalCopyright", "Copyright © 2025 Acme Labs Ltd. All rights reserved." "\0"(Use your actual reverse-DNS bundle id / legal entity.)
No functional impact, purely branding hygiene.examples/mobile_wallet_example/macos/Runner/Configs/Warnings.xcconfig (1)
1-13
: Consider enabling a few additional warnings for even stricter buildsGreat to see an aggressive warning set! Two flags commonly enabled in modern Cocoa projects are missing:
+CLANG_WARN_DOCUMENTATION_COMMENTS = YES +GCC_TREAT_WARNINGS_AS_ERRORS = YES
-Wdocumentation
catches out-of-sync API docs, while turning warnings into errors keeps the codebase clean over time.
Feel free to skip if this is known and intentional.examples/mobile_wallet_example/windows/runner/utils.h (1)
1-18
: Namespace & [[nodiscard]] would avoid accidental misuseAll utilities currently pollute the global namespace and the conversion helpers silently drop failure information.
-#ifndef RUNNER_UTILS_H_ -#define RUNNER_UTILS_H_ +// RUNNER utilities – isolated in their own namespace. +#ifndef RUNNER_UTILS_H_ +#define RUNNER_UTILS_H_ + +namespace runner { // <-- new // … -void CreateAndAttachConsole(); +void CreateAndAttachConsole(); -std::string Utf8FromUtf16(const wchar_t* utf16_string); +[[nodiscard]] std::string Utf8FromUtf16(const wchar_t* utf16_string); -std::vector<std::string> GetCommandLineArguments(); +[[nodiscard]] std::vector<std::string> GetCommandLineArguments(); + +} // namespace runner // <-- new #endif // RUNNER_UTILS_H_Benefits
• Prevents name clashes with other Windows helpers.
•[[nodiscard]]
warns callers who forget to check the return value.
[this change is header-only; correspondingutils.cpp
qualifiers will needrunner::
].examples/mobile_wallet_example/windows/runner/flutter_window.h (2)
14-17
: Mark destructor withoverride
for clarity & catch mismatches
Win32Window
already declares a virtual destructor. Marking the derived one withoverride
lets the compiler verify the signature and prevents subtle v-table errors.- virtual ~FlutterWindow(); + ~FlutterWindow() override;No behaviour change, compile-time safety only.
25-31
: Disable copying to avoid double-destroy of theFlutterViewController
flutter_controller_
is aunique_ptr
, but the implicit copy constructor/assignment operator generated by the compiler will be ill-formed once an out-of-class definition sneaks in. Explicitly delete them now.private: // The project to run. flutter::DartProject project_; // The Flutter instance hosted by this window. std::unique_ptr<flutter::FlutterViewController> flutter_controller_; + + FlutterWindow(const FlutterWindow&) = delete; + FlutterWindow& operator=(const FlutterWindow&) = delete;examples/mobile_wallet_example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (1)
62-64
: GPU validation enabled by default slows down debug launches
enableGPUValidationMode = "1"
forces Metal validation every launch, increasing app start-up time considerably. Consider gating this behind a user-defined setting or disabling for the default example to improve developer UX.examples/mobile_wallet_example/macos/Runner/Base.lproj/MainMenu.xib (1)
1-344
: Do not manually edit or track this auto-generated XIBThis file is produced by Flutter’s macOS template and will be overwritten on every
flutter create
/flutter build
. Keeping it under version control leads to noisy diffs and merge conflicts while offering no long-term value.
Suggested action: delete the file from the PR and add the pattern
examples/**/macos/Runner/Base.lproj/*.xib
to.gitignore
.examples/mobile_wallet_example/android/app/src/main/res/values/styles.xml (1)
4-17
: Add a dark-mode style to avoid blinding usersOnly a light
LaunchTheme/NormalTheme
is provided. On devices in dark mode the splash & background will still be bright white, breaking platform expectations.<!-- dark resources --> +<style name="LaunchTheme" parent="@android:style/Theme.Dark.NoTitleBar" tools:targetApi="29"> + <item name="android:windowBackground">@drawable/launch_background_dark</item> +</style> + +<style name="NormalTheme" parent="@android:style/Theme.Dark.NoTitleBar" tools:targetApi="29"> + <item name="android:windowBackground">?android:colorBackground</item> +</style>Place the dark variants in
values-night/styles.xml
and supply a matchinglaunch_background_dark.xml
.examples/wallet_app/lib/screens/home_screen.dart (2)
28-38
: Strings are hard-coded; extract to localization for i18n
'Mobile Wallet'
and the descriptive sentences are embedded literals. Moving them tol10n
/intl
files keeps the UI translatable and consistent with the rest of the app.
79-88
: Method reference prevents const-constructorBecause
_handleMobileWalletConnect
is captured in theonPressed
callback, the surroundingElevatedButton.icon
cannot beconst
. If you store the callback in afinal void Function()?
field or convert_buildMobileWalletCard
into aStatelessWidget
, the button (and the whole card) becomes const-constructible, slightly reducing rebuild cost.examples/mobile_wallet_example/windows/runner/CMakeLists.txt (1)
35-37
: Optional: link system libraries conditionally
dwmapi.lib
is only available on Vista+. If you ever target older Windows versions, guard the link with a version check; otherwise you can ignore this note.examples/mobile_wallet_example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (1)
1-100
: IDE-generated scheme – consider removing from VCS
*.xcscheme
files are regenerated by Xcode and tend to diverge per-developer (debugger choices, GPU validation flags, etc.). Storing them bloats diffs and can cause pointless merge conflicts. Unless you rely on scheme customisation in CI, you can safely.gitignore
thexcshareddata
directory.examples/wallet_app/lib/main.dart (1)
70-88
: Listener triggerssetState
on every frame change
TabController
fires on animation ticks; wrapping the body insetState
for every tick is unnecessary. UseaddListener
only on index change:_tabController.addListener(() { if (_currentIndex != _tabController.index) { setState(() => _currentIndex = _tabController.index); } });examples/mobile_wallet_example/linux/runner/my_application.cc (1)
50-59
: Show window after adding Flutter view to avoid flickerGTK best practice: add child widgets before calling
gtk_widget_show
. Minor UX polish.- gtk_widget_show(GTK_WIDGET(window)); … gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); - fl_register_plugins(FL_PLUGIN_REGISTRY(view)); - … - gtk_widget_grab_focus(GTK_WIDGET(view)); + + fl_register_plugins(FL_PLUGIN_REGISTRY(view)); + … + gtk_widget_grab_focus(GTK_WIDGET(view)); + gtk_widget_show(GTK_WIDGET(window));examples/mobile_wallet_example/linux/CMakeLists.txt (1)
42-47
: Consider downgrading-Werror
to avoid spurious build breaks
APPLY_STANDARD_SETTINGS
promotes all warnings (-Wall
) to errors (-Werror
) for every target, including generated code from Flutter/plugins that you do not control. A benign compiler warning in those sources will now block CI.If you still want strictness for your own code, prefer enabling
-Werror
only for specific sub-targets:-function(APPLY_STANDARD_SETTINGS TARGET) - target_compile_features(${TARGET} PUBLIC cxx_std_14) - target_compile_options(${TARGET} PRIVATE -Wall -Werror) +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_14) + target_compile_options(${TARGET} PRIVATE -Wall) + # Treat warnings as errors only for first-party targets + if(${TARGET} STREQUAL "${BINARY_NAME}") + target_compile_options(${TARGET} PRIVATE -Werror) + endif()setup_mobile_wallet.sh (2)
105-108
: Guardcd
operationIf
flutter create
fails the subsequentcd ..
will execute from an unexpected directory. Protect thecd
calls:- cd examples + cd examples || exit 1 ... - cd .. + cd .. || exit 1🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 105-105: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
112-118
: Handle build-runner failures strictlyA failed
build_runner
currently logs a warning but the script continues, which can leave stale generated files.
Consider aborting or at least bubbling the non-zero exit code so CI fails deterministically.-dart run build_runner build --delete-conflicting-outputs || print_warning "Build runner failed for starknet package" +dart run build_runner build --delete-conflicting-outputs || { + print_error "build_runner failed for starknet package" + exit 1 +}🧰 Tools
🪛 Shellcheck (0.10.0)
[warning] 112-112: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
[warning] 116-116: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
README.md (3)
25-28
: Remove meta-instruction from committed READMELines 25-28 are editorial guidance (“Add this section to your main
README.md
file”).
Now that the text is already insideREADME.md
, those lines are noise and will confuse readers / generate stale diffs.-# Mobile Wallet Integration Section for Main README - -Add this section to your main `README.md` file: -
121-135
: Specify a language on the fenced code block to silence MD040
markdownlint
flags this diagram because the code fence has no language.
Usetext
,ascii
, ormermaid
to remove the warning and improve renderer hints.-``` +```text …🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
121-121: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
31-37
: Tiny grammar tweak“In Maintain security with end-to-end encryption” is missing the preposition “to” (“maintain security with e2e encryption” already works, but the bold bullet heading reads awkwardly).
Rephrase for clarity:-**Maintain security** with end-to-end encryption +**Maintain security** through end-to-end encryption🧰 Tools
🪛 LanguageTool
[uncategorized] ~36-~36: Possible missing preposition found.
Context: ...alls** with QR code or deep linking - Maintain security with end-to-end encryption ...(AI_HYDRA_LEO_MISSING_TO)
docs/mobile-wallet-integration.md (1)
29-37
: Pin 3rd-party dependency versions more looselyHard-coding
walletconnect_flutter_v2: ^2.1.12
,qr_flutter: ^4.1.0
, etc. can lead to stale docs quickly.
Unless a minimum version is mandatory, consider omitting the patch component or adding a note (“use the latest 2.x”).
Example:walletconnect_flutter_v2: ^2.1.0 # or latest 2.xexamples/mobile_wallet_example/windows/flutter/CMakeLists.txt (1)
1-11
: Mark file as generated to prevent accidental editsA brief header comment such as:
# Generated by Flutter — do NOT edit manually.
helps future contributors realise changes will be overwritten by
flutter pub run
.
No functional change required.examples/mobile_wallet_example/windows/runner/win32_window.h (1)
90-100
: Consider RAII/smart-pointer wrapper for child HWND
child_content_
is a rawHWND
that’s destroyed manually inOnDestroy
(implementation not shown).
To avoid leaks or double-destroy, you could encapsulate it in a small RAII helper or at least document ownership semantics.Not blocking, but worth tracking.
packages/wallet_kit/lib/widgets/mobile_wallet_connector.dart (3)
71-73
: Consider showing initialization errors immediatelyWhen initialization fails, the error is only stored in state without immediate user feedback. Consider showing a snackbar or updating the UI state to reflect the initialization failure.
} catch (e) { _setError('Initialization failed: $e'); + widget.onError?.call('Initialization failed: $e'); }
388-389
: Remove redundant null checkThe null check is unnecessary as this method is only called when
_connectionUri
is confirmed to be non-null (line 362).Widget _buildQRCodeDisplay() { - if (_connectionUri == null) return const SizedBox(); - return Card(
688-689
: Consider allowing modal dismissalThe modal is currently not dismissible, which might frustrate users who want to cancel the connection process. Consider allowing dismissal with proper cleanup.
- isDismissible: false, - enableDrag: false, + isDismissible: true, + enableDrag: true,examples/wallet_app/lib/screens/mobile_wallet_screen.dart (1)
266-292
: Add TODO comments to placeholder implementationsThe action methods are placeholder implementations but lack TODO comments. Add clear indicators that these need to be implemented.
void _sendETH() { - // Implement ETH sending logic + // TODO: Implement ETH sending logic ScaffoldMessenger.of(context).showSnackBar( const SnackBar(content: Text('ETH sending functionality')), ); } void _signMessage() { - // Implement message signing logic + // TODO: Implement message signing logic ScaffoldMessenger.of(context).showSnackBar( const SnackBar(content: Text('Message signing functionality')), ); } void _testTransaction() { - // Implement test transaction logic + // TODO: Implement test transaction logic ScaffoldMessenger.of(context).showSnackBar( const SnackBar(content: Text('Test transaction functionality')), ); } void _viewHistory() { - // Implement history viewing logic + // TODO: Implement history viewing logic ScaffoldMessenger.of(context).showSnackBar( const SnackBar(content: Text('Transaction history functionality')), ); }packages/starknet_provider/lib/src/mobile_provider.dart (1)
207-212
: Make connection polling configurableThe polling logic uses hardcoded values (40 attempts, 500ms intervals). These should be configurable parameters.
static Future<StarknetMobileProvider> createAndConnect({ // ... existing parameters ... Duration? connectionTimeout, + int maxPollingAttempts = 40, + Duration pollingInterval = const Duration(milliseconds: 500), }) async {// Wait for connection to be established var attempts = 0; - const maxAttempts = 40; // 20 seconds with 500ms intervals - while (!provider.isMobileConnected && attempts < maxAttempts) { - await Future.delayed(const Duration(milliseconds: 500)); + while (!provider.isMobileConnected && attempts < maxPollingAttempts) { + await Future.delayed(pollingInterval); attempts++; }packages/wallet_kit/lib/services/mobile_wallet_service.dart (1)
78-82
:showQRCode
parameter is unused
Either implement the QR-code branch or remove the flag to avoid dead-code API surface.packages/wallet_kit/lib/models/mobile_connection.dart (1)
155-157
: Hard-coded gas estimate is a temporary stub
estimatedGas
always returns 50 000. Consider integrating on-chain fee estimation or exposing this as an optional parameter to avoid misleading UX.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (36)
examples/mobile_wallet_example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
is excluded by!**/*.png
examples/mobile_wallet_example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
is excluded by!**/*.png
examples/mobile_wallet_example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
is excluded by!**/*.png
examples/mobile_wallet_example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
is excluded by!**/*.png
examples/mobile_wallet_example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
is excluded by!**/*.png
examples/mobile_wallet_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
is excluded by!**/*.png
examples/mobile_wallet_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
is excluded by!**/*.png
examples/mobile_wallet_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
is excluded by!**/*.png
examples/mobile_wallet_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
is excluded by!**/*.png
examples/mobile_wallet_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
is excluded by!**/*.png
examples/mobile_wallet_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
is excluded by!**/*.png
examples/mobile_wallet_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
is excluded by!**/*.png
examples/mobile_wallet_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
is excluded by!**/*.png
examples/mobile_wallet_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
is excluded by!**/*.png
examples/mobile_wallet_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
is excluded by!**/*.png
examples/mobile_wallet_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
is excluded by!**/*.png
examples/mobile_wallet_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
is excluded by!**/*.png
examples/mobile_wallet_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
is excluded by!**/*.png
examples/mobile_wallet_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
is excluded by!**/*.png
examples/mobile_wallet_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
is excluded by!**/*.png
examples/mobile_wallet_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
is excluded by!**/*.png
examples/mobile_wallet_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]
is excluded by!**/*.png
examples/mobile_wallet_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]
is excluded by!**/*.png
examples/mobile_wallet_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
is excluded by!**/*.png
examples/mobile_wallet_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
is excluded by!**/*.png
examples/mobile_wallet_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
is excluded by!**/*.png
examples/mobile_wallet_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
is excluded by!**/*.png
examples/mobile_wallet_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
is excluded by!**/*.png
examples/mobile_wallet_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
is excluded by!**/*.png
examples/mobile_wallet_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
is excluded by!**/*.png
examples/mobile_wallet_example/web/favicon.png
is excluded by!**/*.png
examples/mobile_wallet_example/web/icons/Icon-192.png
is excluded by!**/*.png
examples/mobile_wallet_example/web/icons/Icon-512.png
is excluded by!**/*.png
examples/mobile_wallet_example/web/icons/Icon-maskable-192.png
is excluded by!**/*.png
examples/mobile_wallet_example/web/icons/Icon-maskable-512.png
is excluded by!**/*.png
examples/mobile_wallet_example/windows/runner/resources/app_icon.ico
is excluded by!**/*.ico
📒 Files selected for processing (104)
README.md
(1 hunks)docs/mobile-wallet-integration.md
(1 hunks)examples/mobile_wallet_example/.gitignore
(1 hunks)examples/mobile_wallet_example/.metadata
(1 hunks)examples/mobile_wallet_example/README.md
(1 hunks)examples/mobile_wallet_example/analysis_options.yaml
(1 hunks)examples/mobile_wallet_example/android/.gitignore
(1 hunks)examples/mobile_wallet_example/android/app/build.gradle.kts
(1 hunks)examples/mobile_wallet_example/android/app/src/debug/AndroidManifest.xml
(1 hunks)examples/mobile_wallet_example/android/app/src/main/AndroidManifest.xml
(1 hunks)examples/mobile_wallet_example/android/app/src/main/kotlin/com/example/mobile_wallet_example/MainActivity.kt
(1 hunks)examples/mobile_wallet_example/android/app/src/main/res/drawable-v21/launch_background.xml
(1 hunks)examples/mobile_wallet_example/android/app/src/main/res/drawable/launch_background.xml
(1 hunks)examples/mobile_wallet_example/android/app/src/main/res/values-night/styles.xml
(1 hunks)examples/mobile_wallet_example/android/app/src/main/res/values/styles.xml
(1 hunks)examples/mobile_wallet_example/android/app/src/profile/AndroidManifest.xml
(1 hunks)examples/mobile_wallet_example/android/build.gradle.kts
(1 hunks)examples/mobile_wallet_example/android/gradle.properties
(1 hunks)examples/mobile_wallet_example/android/gradle/wrapper/gradle-wrapper.properties
(1 hunks)examples/mobile_wallet_example/android/settings.gradle.kts
(1 hunks)examples/mobile_wallet_example/ios/.gitignore
(1 hunks)examples/mobile_wallet_example/ios/Flutter/AppFrameworkInfo.plist
(1 hunks)examples/mobile_wallet_example/ios/Flutter/Debug.xcconfig
(1 hunks)examples/mobile_wallet_example/ios/Flutter/Release.xcconfig
(1 hunks)examples/mobile_wallet_example/ios/Runner.xcodeproj/project.pbxproj
(1 hunks)examples/mobile_wallet_example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
(1 hunks)examples/mobile_wallet_example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
(1 hunks)examples/mobile_wallet_example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
(1 hunks)examples/mobile_wallet_example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
(1 hunks)examples/mobile_wallet_example/ios/Runner.xcworkspace/contents.xcworkspacedata
(1 hunks)examples/mobile_wallet_example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
(1 hunks)examples/mobile_wallet_example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
(1 hunks)examples/mobile_wallet_example/ios/Runner/AppDelegate.swift
(1 hunks)examples/mobile_wallet_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
(1 hunks)examples/mobile_wallet_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
(1 hunks)examples/mobile_wallet_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
(1 hunks)examples/mobile_wallet_example/ios/Runner/Base.lproj/LaunchScreen.storyboard
(1 hunks)examples/mobile_wallet_example/ios/Runner/Base.lproj/Main.storyboard
(1 hunks)examples/mobile_wallet_example/ios/Runner/Info.plist
(1 hunks)examples/mobile_wallet_example/ios/Runner/Runner-Bridging-Header.h
(1 hunks)examples/mobile_wallet_example/ios/RunnerTests/RunnerTests.swift
(1 hunks)examples/mobile_wallet_example/linux/.gitignore
(1 hunks)examples/mobile_wallet_example/linux/CMakeLists.txt
(1 hunks)examples/mobile_wallet_example/linux/flutter/CMakeLists.txt
(1 hunks)examples/mobile_wallet_example/linux/runner/CMakeLists.txt
(1 hunks)examples/mobile_wallet_example/linux/runner/main.cc
(1 hunks)examples/mobile_wallet_example/linux/runner/my_application.cc
(1 hunks)examples/mobile_wallet_example/linux/runner/my_application.h
(1 hunks)examples/mobile_wallet_example/macos/.gitignore
(1 hunks)examples/mobile_wallet_example/macos/Flutter/Flutter-Debug.xcconfig
(1 hunks)examples/mobile_wallet_example/macos/Flutter/Flutter-Release.xcconfig
(1 hunks)examples/mobile_wallet_example/macos/Runner.xcodeproj/project.pbxproj
(1 hunks)examples/mobile_wallet_example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
(1 hunks)examples/mobile_wallet_example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
(1 hunks)examples/mobile_wallet_example/macos/Runner.xcworkspace/contents.xcworkspacedata
(1 hunks)examples/mobile_wallet_example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
(1 hunks)examples/mobile_wallet_example/macos/Runner/AppDelegate.swift
(1 hunks)examples/mobile_wallet_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
(1 hunks)examples/mobile_wallet_example/macos/Runner/Base.lproj/MainMenu.xib
(1 hunks)examples/mobile_wallet_example/macos/Runner/Configs/AppInfo.xcconfig
(1 hunks)examples/mobile_wallet_example/macos/Runner/Configs/Debug.xcconfig
(1 hunks)examples/mobile_wallet_example/macos/Runner/Configs/Release.xcconfig
(1 hunks)examples/mobile_wallet_example/macos/Runner/Configs/Warnings.xcconfig
(1 hunks)examples/mobile_wallet_example/macos/Runner/DebugProfile.entitlements
(1 hunks)examples/mobile_wallet_example/macos/Runner/Info.plist
(1 hunks)examples/mobile_wallet_example/macos/Runner/MainFlutterWindow.swift
(1 hunks)examples/mobile_wallet_example/macos/Runner/Release.entitlements
(1 hunks)examples/mobile_wallet_example/macos/RunnerTests/RunnerTests.swift
(1 hunks)examples/mobile_wallet_example/pubspec.yml
(1 hunks)examples/mobile_wallet_example/test/widget_test.dart
(1 hunks)examples/mobile_wallet_example/web/index.html
(1 hunks)examples/mobile_wallet_example/web/manifest.json
(1 hunks)examples/mobile_wallet_example/windows/.gitignore
(1 hunks)examples/mobile_wallet_example/windows/CMakeLists.txt
(1 hunks)examples/mobile_wallet_example/windows/flutter/CMakeLists.txt
(1 hunks)examples/mobile_wallet_example/windows/runner/CMakeLists.txt
(1 hunks)examples/mobile_wallet_example/windows/runner/Runner.rc
(1 hunks)examples/mobile_wallet_example/windows/runner/flutter_window.cpp
(1 hunks)examples/mobile_wallet_example/windows/runner/flutter_window.h
(1 hunks)examples/mobile_wallet_example/windows/runner/main.cpp
(1 hunks)examples/mobile_wallet_example/windows/runner/resource.h
(1 hunks)examples/mobile_wallet_example/windows/runner/runner.exe.manifest
(1 hunks)examples/mobile_wallet_example/windows/runner/utils.cpp
(1 hunks)examples/mobile_wallet_example/windows/runner/utils.h
(1 hunks)examples/mobile_wallet_example/windows/runner/win32_window.cpp
(1 hunks)examples/mobile_wallet_example/windows/runner/win32_window.h
(1 hunks)examples/wallet_app/.env
(1 hunks)examples/wallet_app/lib/main.dart
(2 hunks)examples/wallet_app/lib/screens/home_screen.dart
(2 hunks)examples/wallet_app/lib/screens/mobile_wallet_screen.dart
(1 hunks)examples/wallet_app/lib/screens/settings_screen.dart
(1 hunks)packages/starknet/lib/src/contract/model/contract_abi.g.dart
(2 hunks)packages/starknet/lib/src/types/execution_request.dart
(1 hunks)packages/starknet/lib/src/types/execution_request.freezed.dart
(1 hunks)packages/starknet/lib/src/wallet/mobile_connector.dart
(1 hunks)packages/starknet_provider/lib/src/mobile_provider.dart
(1 hunks)packages/wallet_kit/lib/models/mobile_connection.dart
(1 hunks)packages/wallet_kit/lib/services/mobile_wallet_service.dart
(1 hunks)packages/wallet_kit/lib/wallet_state/wallet_provider.g.dart
(1 hunks)packages/wallet_kit/lib/widgets/mobile_wallet_connector.dart
(1 hunks)packages/wallet_kit/lib/widgets/nft_details.g.dart
(2 hunks)packages/wallet_kit/lib/widgets/nft_list.g.dart
(1 hunks)setup_mobile_wallet.sh
(1 hunks)test_mobile_wallet.sh
(1 hunks)
🧰 Additional context used
🧠 Learnings (7)
examples/mobile_wallet_example/ios/RunnerTests/RunnerTests.swift (1)
Learnt from: devnet0x
PR: focustree/starknet.dart#406
File: examples/starknet_counter/ios/RunnerTests/RunnerTests.swift:5-11
Timestamp: 2024-10-10T20:49:14.904Z
Learning: In the `examples/starknet_counter/ios/RunnerTests/RunnerTests.swift` file, the `testExample` function is not used by the example and can remain empty.
examples/mobile_wallet_example/linux/runner/CMakeLists.txt (1)
Learnt from: ptisserand
PR: focustree/starknet.dart#435
File: examples/wallet_app/linux/runner/my_application.cc:69-69
Timestamp: 2025-01-08T23:02:27.956Z
Learning: The Linux runner code in `examples/wallet_app/linux/runner/` directory is generated by Flutter and should not be modified manually as it will be regenerated by the framework.
examples/mobile_wallet_example/macos/RunnerTests/RunnerTests.swift (1)
Learnt from: devnet0x
PR: focustree/starknet.dart#406
File: examples/starknet_counter/ios/RunnerTests/RunnerTests.swift:5-11
Timestamp: 2024-10-10T20:49:14.904Z
Learning: In the `examples/starknet_counter/ios/RunnerTests/RunnerTests.swift` file, the `testExample` function is not used by the example and can remain empty.
examples/mobile_wallet_example/macos/Runner/Base.lproj/MainMenu.xib (1)
Learnt from: devnet0x
PR: focustree/starknet.dart#406
File: examples/starknet_counter/macos/Runner/Base.lproj/MainMenu.xib:36-36
Timestamp: 2024-10-10T21:01:11.390Z
Learning: The file `MainMenu.xib` in `examples/starknet_counter/macos/Runner/Base.lproj` is auto-generated by Flutter and should not be modified manually.
examples/mobile_wallet_example/ios/Runner.xcodeproj/project.pbxproj (2)
Learnt from: devnet0x
PR: focustree/starknet.dart#406
File: examples/starknet_counter/macos/Runner.xcodeproj/project.pbxproj:460-460
Timestamp: 2024-10-10T21:00:42.414Z
Learning: The file `examples/starknet_counter/macos/Runner.xcodeproj/project.pbxproj` is auto-generated by Flutter and should not be modified manually.
Learnt from: devnet0x
PR: focustree/starknet.dart#406
File: examples/starknet_counter/macos/Runner.xcodeproj/project.pbxproj:636-648
Timestamp: 2024-10-10T21:00:42.003Z
Learning: The file `examples/starknet_counter/macos/Runner.xcodeproj/project.pbxproj` is auto-generated by Flutter and should not be manually edited.
packages/starknet/lib/src/types/execution_request.freezed.dart (1)
Learnt from: rukafe0x
PR: focustree/starknet.dart#412
File: packages/starknet_provider/lib/src/model/invoke_transaction.freezed.dart:26-31
Timestamp: 2024-10-26T15:39:54.600Z
Learning: In the `starknet_provider/lib/src/model/invoke_transaction.freezed.dart` file and other files with the `.freezed.dart` extension, the code is automatically generated by the `freezed` package and should not be manually modified.
examples/mobile_wallet_example/macos/Runner.xcodeproj/project.pbxproj (2)
Learnt from: devnet0x
PR: focustree/starknet.dart#406
File: examples/starknet_counter/macos/Runner.xcodeproj/project.pbxproj:460-460
Timestamp: 2024-10-10T21:00:42.414Z
Learning: The file `examples/starknet_counter/macos/Runner.xcodeproj/project.pbxproj` is auto-generated by Flutter and should not be modified manually.
Learnt from: devnet0x
PR: focustree/starknet.dart#406
File: examples/starknet_counter/macos/Runner.xcodeproj/project.pbxproj:636-648
Timestamp: 2024-10-10T21:00:42.003Z
Learning: The file `examples/starknet_counter/macos/Runner.xcodeproj/project.pbxproj` is auto-generated by Flutter and should not be manually edited.
🪛 dotenv-linter (3.3.0)
examples/wallet_app/.env
[warning] 4-4: [ExtraBlankLine] Extra blank line detected
[warning] 6-6: [EndingBlankLine] No blank line at the end of the file
🪛 YAMLlint (1.37.1)
examples/mobile_wallet_example/pubspec.yml
[error] 1-1: wrong new line character: expected \n
(new-lines)
[error] 13-13: trailing spaces
(trailing-spaces)
[error] 31-31: trailing spaces
(trailing-spaces)
[error] 37-37: trailing spaces
(trailing-spaces)
[error] 46-46: no new line character at the end of file
(new-line-at-end-of-file)
🪛 Shellcheck (0.10.0)
setup_mobile_wallet.sh
[warning] 105-105: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
[warning] 112-112: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
[warning] 116-116: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
test_mobile_wallet.sh
[warning] 8-8: YELLOW appears unused. Verify use (or export if used externally).
(SC2034)
[warning] 74-74: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
[warning] 101-101: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
🪛 LanguageTool
README.md
[uncategorized] ~36-~36: Possible missing preposition found.
Context: ...alls** with QR code or deep linking - Maintain security with end-to-end encryption ...
(AI_HYDRA_LEO_MISSING_TO)
docs/mobile-wallet-integration.md
[uncategorized] ~7-~7: You might be missing the article “the” here.
Context: ...w
The mobile wallet integration uses WalletConnect v2 protocol to establish secure communi...
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
[uncategorized] ~11-~11: Possible missing preposition found.
Context: ...ions securely on their mobile device
- Execute contract calls without exposing private...
(AI_HYDRA_LEO_MISSING_TO)
[uncategorized] ~389-~389: You might be missing the article “the” here.
Context: ...e
- Communication is encrypted through WalletConnect protocol
- Transaction details are ver...
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
[uncategorized] ~414-~414: You might be missing the article “the” here.
Context: ...
3. Transaction Fails
- Verify account has sufficient balance for gas
- Ch...
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
[uncategorized] ~416-~416: You might be missing the article “the” here.
Context: ...ddress and calldata format
- Ensure account is deployed on the network
Debug...
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
[grammar] ~444-~444: It seems that “to” is missing before the verb.
Context: ...le wallet integration is additive
2. Add mobile wallet option - Users can choo...
(MISSING_TO_BETWEEN_BE_AND_VB)
🪛 markdownlint-cli2 (0.17.2)
README.md
121-121: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
🔇 Additional comments (60)
examples/mobile_wallet_example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (1)
5-6
: Disable SwiftUI previews in workspace
ThePreviewsEnabled
key is correctly set tofalse
to turn off Xcode previews at the workspace level.examples/mobile_wallet_example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (1)
5-6
: Record macOS 32-bit compatibility warning
SettingIDEDidComputeMac32BitWarning
totrue
ensures the IDE tracks 32-bit compatibility warnings. This aligns with standard Xcode workspace checks.examples/mobile_wallet_example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (1)
5-6
: Record macOS 32-bit compatibility warning
This duplicate workspace-plist under the.xcodeproj
folder matches the one in the workspace root. Both are consistent and necessary for IDE checks.examples/mobile_wallet_example/ios/Runner/Runner-Bridging-Header.h (1)
1-1
: Bridging header inclusion is correct.
GeneratedPluginRegistrant.h
is properly imported to register Flutter plugins.examples/mobile_wallet_example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata (1)
1-7
: Confirm necessity of nested Xcode workspace.A workspace inside
Runner.xcodeproj
is atypical—verify that this nestedproject.xcworkspace/contents.xcworkspacedata
is required by your build setup, otherwise consider removing it to avoid confusion.examples/mobile_wallet_example/ios/Runner.xcworkspace/contents.xcworkspacedata (1)
1-7
: Workspace file correctly references the project.This
contents.xcworkspacedata
points toRunner.xcodeproj
and will enable a proper Xcode workspace.examples/mobile_wallet_example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (1)
1-8
: Auto-generated Xcode workspace config—no review needed.
These settings are standard IDE workspace checks and don’t require manual inspection.examples/mobile_wallet_example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (1)
1-8
: Auto-generated Xcode workspace config—no review needed.
This is a duplicate workspace check file, matching the expected Flutter project structure.examples/mobile_wallet_example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (1)
1-8
: Auto-generated workspace settings—no review needed.
Disabling previews via WorkspaceSettings is common for Flutter iOS projects.examples/mobile_wallet_example/macos/Runner/Configs/Release.xcconfig (1)
1-2
: Release configuration includes are correct.
The file properly consolidates the Flutter release settings and custom warnings. Paths align with the example project structure.examples/mobile_wallet_example/macos/Runner.xcworkspace/contents.xcworkspacedata (1)
1-7
: Workspace file is minimal and correct.
The XML declares version="1.0" and references theRunner.xcodeproj
as expected. No issues detected.examples/mobile_wallet_example/macos/Runner/Configs/Debug.xcconfig (1)
1-2
: Included xcconfig paths look correct.
The relative include of../../Flutter/Flutter-Debug.xcconfig
and localWarnings.xcconfig
aligns with the project layout. Confirm thatWarnings.xcconfig
is present.examples/mobile_wallet_example/macos/Flutter/Flutter-Release.xcconfig (1)
1-1
: Release configuration include is appropriate.
Referencingephemeral/Flutter-Generated.xcconfig
ensures Flutter’s generated build settings are applied for release. Verify that theephemeral
directory is generated as part of the macOS build.packages/wallet_kit/lib/wallet_state/wallet_provider.g.dart (1)
9-9
: Generated debug hash updated
The source hash forwalletsProvider
has been refreshed to reflect recent changes in the state management code. No manual edits are required in generated files.examples/mobile_wallet_example/macos/.gitignore (1)
6-6
: Verify.gitignore
entry fordgph
The pattern**/dgph
is uncommon—please confirm this directory exists or correct the pattern if it’s a typo.examples/mobile_wallet_example/windows/runner/runner.exe.manifest (2)
1-7
: Validate DPI awareness settingPerMonitorV2 is ideal for high-DPI support on modern Windows displays. Ensure this aligns with the app’s DPI scaling requirements and that testing covers multiple monitor configurations.
8-14
: Confirm supported OS entriesYou’ve declared Windows 10/11 support with the given GUID. Verify whether you need to include additional supportedOS GUIDs (e.g., Windows 8.1) or confirm that this GUID covers both Windows 10 and 11 scenarios.
examples/mobile_wallet_example/android/app/src/debug/AndroidManifest.xml (1)
1-7
: Approve debug Internet permissionThe
INTERNET
permission in the debug manifest is correctly scoped to the debug build for Flutter tooling.examples/mobile_wallet_example/macos/Runner/DebugProfile.entitlements (1)
1-12
: Sandbox entitlements look correctThe debug entitlements enable sandbox, JIT, and network server for profiling. This aligns with Flutter’s debug workflow.
examples/mobile_wallet_example/linux/runner/main.cc (1)
1-6
: Simple GLib application entrypointThe main function correctly initializes the application and runs the GTK application loop with automatic memory management via a smart pointer.
examples/mobile_wallet_example/android/gradle/wrapper/gradle-wrapper.properties (1)
1-5
: Gradle wrapper configuration is correctUsing Gradle 8.10.2 with the
-all
distribution ensures reproducible builds for the Android example.examples/mobile_wallet_example/android/app/src/main/res/drawable-v21/launch_background.xml (1)
1-13
: Ensure splash background attribute aligns with app theme
The use of?android:colorBackground
picks up the system background color. Verify that yourLaunchTheme
andNormalTheme
define and override this attribute correctly for both light and dark modes.examples/mobile_wallet_example/macos/Runner/Configs/AppInfo.xcconfig (1)
8-14
: Verify bundle identifier and copyright
ThePRODUCT_BUNDLE_IDENTIFIER
andPRODUCT_COPYRIGHT
values look correct. Ensure they match your organization’s standards (e.g., reverse DNS notation) and consider auto-generating these from your Flutterpubspec.yaml
in the future.examples/mobile_wallet_example/android/app/src/main/kotlin/com/example/mobile_wallet_example/MainActivity.kt (1)
1-5
: Android entrypoint setup
TheMainActivity
extendingFlutterActivity
is correct and minimal. No additional Android lifecycle customization is required here.examples/mobile_wallet_example/windows/runner/resource.h (1)
5-15
: Define resource identifiers
TheIDI_APP_ICON
and default next resource values are appropriately set. Confirm your.rc
script referencesIDI_APP_ICON
consistently in the Windows runner.packages/wallet_kit/lib/widgets/nft_list.g.dart (1)
23-27
: Avoid manual edits in generated sources
nft_list.g.dart
is regenerated by riverpod_generator; local edits are wiped on the next build.
If the deprecation notice was injected manually, move it to the source (nft_list.dart
) so it survives code-gen.examples/mobile_wallet_example/ios/Runner/Base.lproj/Main.storyboard (1)
11-20
: Confirm that storyboard is actually referencedFlutter projects default to
FlutterViewController
viaInfo.plist
’sUILaunchStoryboardName
.
Double-check thatMain.storyboard
is listed there; otherwise this file is unused and can be dropped to cut repo size.examples/mobile_wallet_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json (1)
1-23
: iOS launch image asset looks correctThe JSON schema, scale variants, and metadata all comply with Xcode’s asset-catalog expectations.
No issues found.examples/mobile_wallet_example/macos/Runner/MainFlutterWindow.swift (1)
11-11
: Check plugin symbol visibility
RegisterGeneratedPlugins
is module-level C-style. Ensure the generated registrant is added to the macOS target; otherwise this will be an undefined symbol at runtime.
No code change required—just a build-settings reminder.packages/wallet_kit/lib/widgets/nft_details.g.dart (1)
156-176
: Generated file committed — verify CI regenerates consistentlyCommitting generator output is acceptable in Dart, but can cause noisy PRs.
Confirm that:
dart run build_runner build --delete-conflicting-outputs
on a clean checkout reproduces the exact same content.- Your CI pipeline re-generates to avoid drift.
No functional issues spotted.
examples/mobile_wallet_example/android/app/src/main/res/drawable/launch_background.xml (1)
1-12
: Android splash drawable is fineSingle-color background with an optional centred bitmap comment follows Flutter template; no concerns.
examples/mobile_wallet_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json (1)
1-68
: No review remarks – metadata LGTMIcon catalog JSON is syntactically valid and follows macOS naming conventions.
examples/mobile_wallet_example/macos/Runner/Info.plist (1)
23-30
: Verify required privacy-usage strings before releaseIf the macOS example initiates WalletConnect or opens external URLs, macOS may require
NSCameraUsageDescription
,NSBluetoothAlwaysUsageDescription
, or similar keys. Confirm none are needed to avoid runtime entitlement prompts.examples/mobile_wallet_example/ios/Flutter/AppFrameworkInfo.plist (1)
1-26
: Auto-generated Flutter framework info.
ThisAppFrameworkInfo.plist
is maintained by Flutter’s build process and should not be modified manually to avoid inconsistencies with the iOS framework.examples/mobile_wallet_example/.gitignore (1)
1-46
: Standard Flutter example .gitignore.
The file correctly excludes IDE, build, and cache artifacts for Flutter and platform-specific builds. No changes required.examples/mobile_wallet_example/android/settings.gradle.kts (2)
2-8
: Ensurelocal.properties
inclusion.
Readinglocal.properties
for the Flutter SDK path is standard; confirm this file is generated or committed by your setup scripts to prevent build failures.
19-23
:✅ Verification successful
Verify the Flutter Gradle plugin ID.
Confirm that the plugin IDdev.flutter.flutter-plugin-loader
matches the published Flutter Gradle plugin (commonlydev.flutter.gradle
) to avoid resolution errors.
🌐 Web query:
Is the Flutter Gradle plugin published under the ID "dev.flutter.flutter-plugin-loader" on the Gradle Plugin Portal?
💡 Result:
The Flutter Gradle plugin with the ID "dev.flutter.flutter-plugin-loader" is referenced in the official Flutter documentation and by default in Flutter-generated project templates since Flutter 3.16, specifically within the Gradle
plugins {}
block insettings.gradle
orsettings.gradle.kts
[1][8][7][10]. This plugin is part of the modern approach to applying Flutter’s Gradle plugins declaratively.However, while the plugin is listed in the
plugins {}
block and configured as if it were available from the Gradle Plugin Portal, it is not actually published there. Instead, the plugin is loaded via anincludeBuild
directive pointing to the local Flutter SDK (typicallypackages/flutter_tools/gradle
within your Flutter installation), which overrides the need to download the plugin from any remote repository[1][8][7].This setup can be seen in typical project configuration:
pluginManagement { def flutterSdkPath = { def properties = new Properties() file("local.properties").withInputStream { properties.load(it) } def flutterSdkPath = properties.getProperty("flutter.sdk") assert flutterSdkPath != null, "flutter.sdk not set in local.properties" return flutterSdkPath }() includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") repositories { google() mavenCentral() gradlePluginPortal() } plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" // other plugins... } }[1][8][7][10]
Key points:
- "dev.flutter.flutter-plugin-loader" is not actually published to the Gradle Plugin Portal or any public Maven repository. Attempts to access it directly through the portal (such as with a URL like
https://plugins.gradle.org/m2/dev/flutter/flutter-plugin-loader/
) will fail[2][3].- The plugin is resolved locally by including the Flutter SDK’s Gradle tools with
includeBuild
, which satisfies the plugin reference during the build process[1][8][7].- Despite the appearance in the
plugins {}
block, it is not a remotely hosted plugin.Conclusion:
No, "dev.flutter.flutter-plugin-loader" is not published on the Gradle Plugin Portal. Instead, it is included locally from the Flutter SDK and referenced in the pluginManagement block for declarative builds. Projects rely on the local Flutter SDK to provide this plugin, not on remote publishing through the plugin portal[1][2][3][8][7][10].Citations:
- 1: https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply
- 2: flutter/flutter#147313
- 3: flutter/flutter#161882
- 4: https://discuss.gradle.org/t/gradle-build-of-flutter-project-failing/49302
- 5: https://www.youtube.com/watch?v=DbrQ1XXU2DE
- 6: https://discuss.gradle.org/t/cant-solve-problem-with-android-plugin-and-gradle-in-flutter/47793
- 7: https://discuss.gradle.org/t/a-problem-occurred-evaluating-root-project-android-a-problem-occurred-configuring-project-app-failed-to-notify-project-evaluation-listener/48310
- 8: https://docs.flutter.dev/release/breaking-changes/flutter-plugins-configuration
- 9: https://discuss.gradle.org/t/plugin-id-com-android-application-was-not-found-in-any-of-the-following-sources/48928
- 10: flutter/flutter#146281
No changes needed to the Flutter Gradle plugin ID
Thedev.flutter.flutter-plugin-loader
identifier is correct—it isn’t published on the Gradle Plugin Portal but is instead provided locally by your Flutter SDK via anincludeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
directive in yourpluginManagement
block. No update todev.flutter.gradle
or any other ID is required.examples/mobile_wallet_example/analysis_options.yaml (1)
8-10
: Recommended Flutter lints enabled.
Includingpackage:flutter_lints/flutter.yaml
ensures consistent, community-recommended lint rules across the example. No further adjustments needed.examples/mobile_wallet_example/linux/runner/CMakeLists.txt (1)
1-27
: Aligns with Flutter generated desktop template.
This CMake configuration matches Flutter’s standard desktop embedding template. Keep it updated alongside Flutter SDK upgrades to prevent build mismatches.examples/mobile_wallet_example/linux/runner/my_application.h (1)
1-18
: Well-structured GObject header
Include guard naming,<gtk/gtk.h>
import,G_DECLARE_FINAL_TYPE
usage, and the GTK-doc style comment formy_application_new()
all follow GObject and project conventions.examples/mobile_wallet_example/android/app/build.gradle.kts (2)
1-6
: Plugin ordering is correct
The Android, Kotlin, and Flutter Gradle plugins are applied in the proper order, satisfying Flutter’s requirements.
42-44
: Flutter source path is set correctly
Theflutter { source = "../.." }
block points at the correct directory for the example project.examples/mobile_wallet_example/android/build.gradle.kts (3)
1-6
: Repository definitions look good
google()
andmavenCentral()
are configured for all projects, ensuring dependencies are resolved properly.
8-10
: Custom build directory override
Redirecting the root build directory two levels up is a valid approach for consolidating artifacts. Ensure this does not conflict with other CI or IDE settings.
19-21
: Clean task is properly registered
Theclean
task deletes the centralized build directory as intended.examples/mobile_wallet_example/macos/Runner/AppDelegate.swift (1)
6-12
: Confirm macOS deployment target coversapplicationSupportsSecureRestorableState
.
applicationSupportsSecureRestorableState(_:)
is available from macOS 13.0.
If the example’s deployment target is lower, this override will silently be ignored at runtime. Make sure the Xcode target (MACOSX_DEPLOYMENT_TARGET
) is ≥ 13 or gate the call with#available(macOS 13, *)
to avoid confusion.examples/mobile_wallet_example/.metadata (1)
1-46
: Generated-only file – no actionable review feedback.examples/mobile_wallet_example/android/app/src/main/res/values-night/styles.xml (1)
4-17
: Night-mode styles look good.examples/mobile_wallet_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json (1)
1-122
: No functional issues – asset catalog looks OKNothing actionable here; the JSON follows the Xcode template and contains the required sizes.
examples/mobile_wallet_example/android/app/src/main/AndroidManifest.xml (1)
10-13
:${applicationName}
placeholder may remain unresolved at build timeIf
applicationName
isn’t defined in your GradlemanifestPlaceholders
, the build will emit
Manifest merger failed : attribute android:name ...
and the app will crash on launch.-android:name="${applicationName}" +# Remove the attribute or add a valid class name / manifestPlaceholderexamples/wallet_app/lib/main.dart (2)
23-30
: Null-safety guard for env variables
dotenv.env['WALLETCONNECT_PROJECT_ID']
can benull
. A direct cast (as String
) crashes with aTypeError
. Prefer an explicit check or!
with a meaningful assert message.- projectId: dotenv.env['WALLETCONNECT_PROJECT_ID'] as String, + final projectId = dotenv.env['WALLETCONNECT_PROJECT_ID']; + assert(projectId != null, 'WALLETCONNECT_PROJECT_ID not set in .env'); + projectId: projectId!,
50-64
: Theme ok – good separation of concerns
Switchinghome
toMainNavigationScreen
cleanly keeps theming untouched.examples/mobile_wallet_example/ios/Runner.xcodeproj/project.pbxproj (1)
1-616
: Auto-generated Xcode project – avoid manual edits
project.pbxproj
is regenerated by Flutter; manual changes are fragile and create noisy diffs. Commit only if strictly necessary (e.g., new native code or capabilities).test_mobile_wallet.sh (1)
66-71
: Exit on analysis / test failures
melos analyze
andmelos test
are OR-ed withprint_error
, so the script logs the failure but still proceeds and eventually prints a ✅ summary.
If analysis or tests fail the script should abort with a non-zero status to keep CI honest.-melos analyze || print_error "Code analysis failed" +melos analyze || { + print_error "Code analysis failed" + exit 1 +} ... -melos test || print_error "Unit tests failed" +melos test || { + print_error "Unit tests failed" + exit 1 +}packages/starknet/lib/src/types/execution_request.freezed.dart (1)
1-4
: Generated file – no manual changes required
*.freezed.dart
files are code-generated; please avoid editing them directly to prevent merge conflicts with futurebuild_runner
runs.examples/mobile_wallet_example/windows/runner/flutter_window.cpp (1)
30-37
: Potential use-after-free: lambda capturesthis
by reference
SetNextFrameCallback([&] { this->Show(); });
stores a lambda that may be invoked after the window instance is destroyed, leavingthis
dangling.Capture the raw pointer instead of the reference to prevent accidental lifetime issues:
- flutter_controller_->engine()->SetNextFrameCallback([&]() { - this->Show(); - }); + auto* self = this; + flutter_controller_->engine()->SetNextFrameCallback([self]() { + self->Show(); + });examples/mobile_wallet_example/macos/Runner.xcodeproj/project.pbxproj (1)
9-21
: Avoid manual edits to auto-generated Xcode project files
*.xcodeproj/project.pbxproj
is generated by Flutter every run; hand changes are routinely overwritten and often cause merge conflicts.
If custom build tweaks are required, prefermacos/Runner.xcodeproj/project.xcconfig
orflutter_build_config.yaml
rather than committing edited PBX rows here.docs/mobile-wallet-integration.md (1)
175-195
: ClarifychainId
type in typed-data example
'chainId': 1
implies an int, whereas Starknet EIP-712 normally expects a felt (BigInt
) encoded as hex.
Readers may copy-paste; consider using a hex string ('0x1'
) or add a comment.'chainId': '0x1', // felt as hexexamples/mobile_wallet_example/linux/flutter/CMakeLists.txt (1)
1-89
: LGTM!Standard Flutter-generated CMake configuration for Linux builds. No issues found.
examples/mobile_wallet_example/windows/runner/win32_window.cpp (1)
1-289
: No issues spotted; implementation aligns with standard Flutter Windows runner pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
examples/mobile_wallet_example/android/.gitignore
(1 hunks)examples/mobile_wallet_example/android/app/src/main/AndroidManifest.xml
(1 hunks)examples/mobile_wallet_example/ios/Flutter/Debug.xcconfig
(1 hunks)examples/mobile_wallet_example/ios/Runner/AppDelegate.swift
(1 hunks)examples/mobile_wallet_example/web/manifest.json
(1 hunks)examples/mobile_wallet_example/windows/runner/main.cpp
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
- examples/mobile_wallet_example/ios/Flutter/Debug.xcconfig
- examples/mobile_wallet_example/web/manifest.json
- examples/mobile_wallet_example/android/app/src/main/AndroidManifest.xml
- examples/mobile_wallet_example/android/.gitignore
- examples/mobile_wallet_example/windows/runner/main.cpp
🔇 Additional comments (1)
examples/mobile_wallet_example/ios/Runner/AppDelegate.swift (1)
6-12
: Double plugin registration
GeneratedPluginRegistrant.register(with:)
is already invoked inside the Flutter-template implementation ofsuper.application(...didFinishLaunchingWithOptions:)
. Calling it here again is usually harmless but unnecessary and may cause confusion with future Flutter upgrades.Consider removing the explicit call unless you have a plugin that must be registered before Flutter initializes.
Hi @ritik4ever, are you still working on this PR ? |
PLease review @ptisserand |
Hi @ritik4ever , I have start to review some part but according to CI build issues it seems that some modifications are missing. |
Hi @ritik4ever, did you see this message ? |
Hi @ptisserand |
Hi @ritik4ever are you still working on this PR ? |
Hi @ritik4ever are you still working on this PR ? |
✅ Mobile Wallet Integration Complete - WalletConnect v2 Protocol
🚀 What's New:
📱 Supported Wallets: Argent Mobile, Braavos Mobile
🔒 Security: Private keys never leave mobile device
📚 Documentation: Complete integration guide + API reference
Closes #510
Summary by CodeRabbit
New Features
Documentation
Tests
Chores