Skip to content

Commit 1699ac2

Browse files
fix(core): align entropy code with bull sdk
1 parent 2cca886 commit 1699ac2

4 files changed

Lines changed: 5 additions & 11 deletions

File tree

lib/core/entropy/domain/usecases/mix_entropy_usecase.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import 'package:bb_mobile/core/entropy/data/services/entropy_pool.dart';
44

55
/// Owns the touch-ceremony lifecycle exposed to onboarding.
66
class MixEntropyUsecase {
7-
const MixEntropyUsecase({required EntropyPool entropyPool})
8-
: _entropyPool = entropyPool;
7+
const MixEntropyUsecase({required this._entropyPool});
98

109
static const requiredSampleCount = EntropyPool.requiredTouchSamples;
1110

lib/core/seed/data/services/mnemonic_generator.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@ import 'package:bull_sdk/bdk.dart' as bdk;
1111
/// platform CSPRNG draw. BDK performs deterministic BIP39 encoding only; its
1212
/// internal random mnemonic constructor is never used here.
1313
class MnemonicGenerator {
14-
MnemonicGenerator({
15-
required EntropyPool entropyPool,
16-
required OsRngSource osRngSource,
17-
}) : _entropyPool = entropyPool,
18-
_osRngSource = osRngSource;
14+
MnemonicGenerator({required this._entropyPool, required this._osRngSource});
1915

2016
final EntropyPool _entropyPool;
2117
final OsRngSource _osRngSource;

lib/features/onboarding/presentation/entropy_ceremony_cubit.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ class EntropyCeremonyState {
2626

2727
/// Serializes pointer samples and feeds them into the current pool ceremony.
2828
class EntropyCeremonyCubit extends Cubit<EntropyCeremonyState> {
29-
EntropyCeremonyCubit({required MixEntropyUsecase mixEntropyUsecase})
30-
: _mixEntropyUsecase = mixEntropyUsecase,
31-
super(const EntropyCeremonyState());
29+
EntropyCeremonyCubit({required this._mixEntropyUsecase})
30+
: super(const EntropyCeremonyState());
3231

3332
final MixEntropyUsecase _mixEntropyUsecase;
3433
final Stopwatch _stopwatch = Stopwatch();

test/core_test/seed/mnemonic_generator_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'dart:typed_data';
33
import 'package:bb_mobile/core/entropy/data/services/entropy_pool.dart';
44
import 'package:bb_mobile/core/entropy/data/services/sources/os_rng_source.dart';
55
import 'package:bb_mobile/core/seed/data/services/mnemonic_generator.dart';
6-
import 'package:bdk_dart/bdk.dart' as bdk;
6+
import 'package:bull_sdk/bdk.dart' as bdk;
77
import 'package:flutter_test/flutter_test.dart';
88

99
Uint8List fixedOsDraw() => Uint8List.fromList(

0 commit comments

Comments
 (0)