Conversation
Overriden pointycastle dependency and pinned to 4.0.0.
There was a problem hiding this comment.
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.darttopackage: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.
lib/iden3comm/domain/use_cases/fetch_onchain_claims_use_case.dart
Outdated
Show resolved
Hide resolved
lib/iden3comm/domain/use_cases/fetch_onchain_claim_use_case.dart
Outdated
Show resolved
Hide resolved
lib/iden3comm/domain/use_cases/fetch_and_save_claims_use_case.dart
Outdated
Show resolved
Hide resolved
plusema86
left a comment
There was a problem hiding this comment.
Let's test it together before release an app with this changes included 💪🏻
6401f44 to
b37b8eb
Compare
|
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
# 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
There was a problem hiding this comment.
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
getRandomBytesis still used but thepackage:web3dart/crypto.dartimport was removed. This will fail to compile unlessgetRandomBytesis provided by another import. Add an import that definesgetRandomBytes, or replace it with an SDK-local random-bytes helper used elsewhere in the repo.
pubspec.yaml:1- The comment says
bip32_plusis a fork, but the dependency is declared as a hosted pub version (^1.0.0). If you really need a fork forpointycastle 4.0.0compatibility, 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.
| 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); |
There was a problem hiding this comment.
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).
|
|
||
| Uint8List toBytes() { | ||
| return hexToBytes(toRadixString(16)); | ||
| return toRadixString(16).hexToBytes(); |
There was a problem hiding this comment.
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).
| return toRadixString(16).hexToBytes(); | |
| final hex = toRadixString(16); | |
| final normalizedHex = hex.length.isOdd ? '0$hex' : hex; | |
| return normalizedHex.hexToBytes(); |
No description provided.