Skip to content

Packages update.#511

Open
5eeman wants to merge 17 commits intodevelopfrom
chore/pubspec_update
Open

Packages update.#511
5eeman wants to merge 17 commits intodevelopfrom
chore/pubspec_update

Conversation

@5eeman
Copy link
Contributor

@5eeman 5eeman commented Sep 19, 2025

No description provided.

@5eeman 5eeman requested review from Copilot and plusema86 September 19, 2025 13:52
@5eeman 5eeman self-assigned this Sep 19, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request performs a comprehensive package update for the PolygonID Flutter SDK, updating dependency versions and refactoring import statements across the codebase.

Key changes include:

  • Upgrading minimum Dart SDK requirement from 3.0.0 to 3.8.0
  • Updating major dependencies like web3dart (to 3.0.1), pointycastle (to 4.0.0), and build tools
  • Consolidating web3dart imports from package:web3dart/crypto.dart to package:web3dart/web3dart.dart

Reviewed Changes

Copilot reviewed 41 out of 42 changed files in this pull request and generated 5 comments.

File Description
pubspec.yaml Updates dependency versions, SDK requirements, and adds git dependencies
Various .dart files Refactors import statements from web3dart/crypto to web3dart/web3dart
Generated .g.dart files Updates generated code formatting and syntax patterns
lib/assets/*.g.dart Updates contract bindings to use wallet package types

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@plusema86 plusema86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's test it together before release an app with this changes included 💪🏻

@5eeman 5eeman force-pushed the chore/pubspec_update branch from 6401f44 to b37b8eb Compare September 19, 2025 17:14
@codecov-commenter
Copy link

codecov-commenter commented Sep 19, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 5.55556% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.12%. Comparing base (427b349) to head (6e726bc).
⚠️ Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
lib/identity/libs/bjj/eddsa_babyjub.dart 0.00% 7 Missing ⚠️
...b/common/kms/key_providers/secp256k1_provider.dart 0.00% 6 Missing ⚠️
lib/proof/gist_proof_cache.dart 0.00% 6 Missing ⚠️
...identity/data/data_sources/wallet_data_source.dart 0.00% 4 Missing ⚠️
lib/common/utils/big_int_extension.dart 0.00% 3 Missing ⚠️
lib/identity/domain/entities/hash_entity.dart 0.00% 3 Missing ⚠️
...ty/data/repositories/identity_repository_impl.dart 33.33% 2 Missing ⚠️
...proof/data/repositories/crosschain_repository.dart 0.00% 2 Missing ⚠️
lib/iden3comm/authenticate.dart 0.00% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #511      +/-   ##
===========================================
+ Coverage    17.06%   17.12%   +0.06%     
===========================================
  Files          321      321              
  Lines        10776    10789      +13     
===========================================
+ Hits          1839     1848       +9     
- Misses        8937     8941       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

# Conflicts:
#	.github/workflows/polygonid_flutter_sdk.yml
#	.gitmodules
#	example/pubspec.lock
#	lib/identity/data/repositories/identity_repository_impl.dart
#	lib/identity/domain/entities/hash_entity.dart
#	lib/identity/libs/bjj/bjj_wallet.dart
#	lib/sdk/di/injector.config.dart
#	pubspec.yaml
#	test/iden3comm/domain/use_cases/get_iden3comm_proofs_use_case_test.dart
@5eeman 5eeman requested a review from Copilot March 12, 2026 15:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 34 out of 35 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (2)

test/common/kms.dart:1

  • getRandomBytes is still used but the package:web3dart/crypto.dart import was removed. This will fail to compile unless getRandomBytes is provided by another import. Add an import that defines getRandomBytes, or replace it with an SDK-local random-bytes helper used elsewhere in the repo.
    pubspec.yaml:1
  • The comment says bip32_plus is a fork, but the dependency is declared as a hosted pub version (^1.0.0). If you really need a fork for pointycastle 4.0.0 compatibility, declare it as a git/path dependency; otherwise, update/remove the comment to avoid misleading maintainers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 139 to 142
final rBytes = signature.R.toRadixString(16).padLeft(32, '0').hexToBytes();
signatureBytes.setRange(0, 32, rBytes);
final sBytes = hexToBytes(signature.S.toRadixString(16).padLeft(32, '0'));
final sBytes = signature.S.toRadixString(16).padLeft(32, '0').hexToBytes();
signatureBytes.setRange(32, 64, sBytes);
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

padLeft(32, '0') produces 32 hex chars (= 16 bytes), but you later write into 32-byte ranges (0..32 and 32..64). This can throw at runtime (and/or produce invalid signatures) if rBytes/sBytes are not exactly 32 bytes. Pad to 64 hex characters for 32-byte values (or otherwise ensure the decoded byte arrays are length 32 before setRange).

Copilot uses AI. Check for mistakes.

Uint8List toBytes() {
return hexToBytes(toRadixString(16));
return toRadixString(16).hexToBytes();
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toRadixString(16) can return an odd-length hex string (e.g., f). Many hex decoders require an even number of characters, so this conversion is fragile unless hexToBytes() explicitly handles odd-length inputs. To preserve prior behavior and avoid edge-case failures, normalize to an even-length hex string before decoding (e.g., left-pad with 0 when needed).

Suggested change
return toRadixString(16).hexToBytes();
final hex = toRadixString(16);
final normalizedHex = hex.length.isOdd ? '0$hex' : hex;
return normalizedHex.hexToBytes();

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants