Skip to content
Merged
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
34 changes: 26 additions & 8 deletions .github/workflows/polygonid_flutter_sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,51 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Init submodules explicitly
run: |
set -e
git submodule sync --recursive
git submodule update --init --recursive || echo "Submodule update failed, will attempt manual clone later"
git submodule status || true

- name: Fallback clone web3dart_builders if missing
run: |
if [ ! -d packages/web3dart_builders/lib ]; then
echo "web3dart_builders submodule not properly initialized. Cloning fallback..."
rm -rf packages/web3dart_builders || true
git clone https://github.com/5eeman/web3dart_builders.git packages/web3dart_builders
fi
ls -al packages/web3dart_builders | head

- name: Verify web3dart_builders path exists
run: |
ls -al packages
ls -al packages/web3dart_builders || (echo "web3dart_builders missing" && exit 1)

- name: Setup Flutter SDK
uses: subosito/flutter-action@v2
with:
flutter-version: '3.32.5'
channel: 'stable'
cache: true
# instead of "channel: stable", you could be more precise by specifying the exact version of Flutter you're using:
# flutter-version: '<FLUTTER_VERSION>'

- name: Verify Flutter version
run: flutter --version

- name: Clean, dependencies and generate for SDK
run: flutter clean&&flutter pub get&&dart run build_runner build --delete-conflicting-outputs
run: flutter clean && flutter pub get && dart run build_runner build -d

- name: Clean, dependencies and generate for Example
env:
DEFAULT_ENV: ${{ secrets.DEFAULT_ENV }}
STACKTRACE_ENCRYPTION_KEY: ${{ secrets.STACKTRACE_ENCRYPTION }}
PINATA_GATEWAY: ${{ secrets.PINATA_GATEWAY }}
PINATA_GATEWAY_TOKEN: ${{ secrets.PINATA_GATEWAY_TOKEN }}
run: cd example&&flutter clean&&flutter pub get&&dart run build_runner build --delete-conflicting-outputs

- name: Format
run: dart format --set-exit-if-changed lib test example
run: cd example && flutter clean && flutter pub get && dart run build_runner build -d

- name: Analyze
run: flutter analyze lib test example
Expand All @@ -64,4 +83,3 @@ jobs:
# - name: Publish dry run
# if: github.base_ref == 'main'
# run: flutter pub publish --dry-run

4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "packages/jose"]
path = packages/jose
url = https://github.com/5eeman/jose.git

9 changes: 0 additions & 9 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,3 @@ targets:
generate_for:
include:
- lib/**/*.dart

builders:
abi_generator:
build_extensions:
".abi.json": [".g.dart"]
import: "package:web3dart_builders/builders.dart"
builder_factories: ["abiGenerator"]
build_to: source
auto_apply: dependents
11 changes: 2 additions & 9 deletions example/integration_test/polygonidcore_mocks.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
import 'dart:typed_data';

import 'package:encrypt/encrypt.dart';
import 'package:polygonid_flutter_sdk/common/domain/entities/env_entity.dart';
import 'package:polygonid_flutter_sdk/common/domain/entities/filter_entity.dart';

class PolygonIdCoreMocks {
static String calculateGenesisIdInputJson = '''
{
Expand Down Expand Up @@ -232,8 +226,7 @@ class PolygonIdCoreMocks {
}
}
}
}
}''';
}''';

static String sigV2InputConfigJson = '''{
"ethereumUrl": "http://localhost:8545",
Expand Down Expand Up @@ -378,7 +371,7 @@ class PolygonIdCoreMocks {
"type": "KYCAgeCredential",
"credentialSubject": {
"birthday": {
"\$gt": 1
"\$in": [1, 19960424]
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion example/lib/src/presentation/ui/splash/splash_event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import 'package:polygonid_flutter_sdk/proof/domain/entities/download_info_entity
part 'splash_event.freezed.dart';

@freezed
class SplashEvent {
class SplashEvent with _$SplashEvent {
const factory SplashEvent.startDownload() = StartDownloadSplashEvent;

const factory SplashEvent.downloadProgressEvent(DownloadInfo downloadInfo) =
DownloadProgressSplashEvent;

const factory SplashEvent.cancelDownloadEvent() = CancelDownloadSplashEvent;
}
Loading