mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
* feat: add exodus style bip39 to monero legacy seed * feat: restore monero wallet from bip39 and add test * bug: fix wrong naming in CI * feat: add monero bip39 UI flow * fix: monero.dart generation * fix: skip monero_wallet_service tests till CI is fixed * ci: copy monero_libwallet2_api_c.so to /usr/lib for testing ci: reduce timeout for cw_monero tests * fix: monero wallet creation credentials default to bip39 if mnemonic are set * fix: do not skip monero wallets services test * fix: Include non bip39 monero wallets on Wallet Group * fix: null pointer stemming from missing language selector if seed is selected * fix: Fixes to Bip39 Creation and restore - Do not restore from 0 for fresh bip39 wallet - disallow restoring bip39 wallet without date or height * fix: Fixes to Bip39 restore - Refresh height is now getting set correctly - Add new create monero wallet tests - Add seed-language English for Bip39 Monero wallets - Fix seed-type naming * feat (cw_monero): Store monero wallet after bip39 creation * feat (cw_monero): remove prints from monero_wallet_service_test.dart * fix: exception during seed language autodetect * feat (cw_monero): Add support for passphrases on bip39 seeds * feat (cw_monero): Add support for passphrases on bip39 seeds * fix: seed language selection for recovering bip39 wallets * style: improve readability of isLegacySeedOnly in wallet_keys_view_model.dart * feat: hide monero seed type selector from advanced settings when creating a child wallet * fix(cw_monero): use named arguments for bip39_seed tests --------- Co-authored-by: cyan <cyjan@mrcyjanek.net>
39 lines
2 KiB
Dart
39 lines
2 KiB
Dart
import 'package:cw_monero/bip39_seed.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
void main() {
|
|
group("Exodus Style bip39", () {
|
|
group("Test Wallet 1", () {
|
|
final bip39Seed = 'meadow tip best belt boss eyebrow control affair eternal piece very shiver';
|
|
final expectedLegacySeed0 = "tasked eight afraid laboratory tail feline rift reinvest vane cafe bailed foggy dormant paper jigsaw king hazard suture king dapper dummy jolted dating dwindling king";
|
|
final expectedLegacySeed1 = "palace pairing axes mohawk rekindle excess awful juvenile shipped talent nibs efficient dapper biggest swung fight pact innocent emerge issued titans affair nearby noises emerge";
|
|
|
|
test("Get legacy Seed from bip39", () {
|
|
final legacySeed = getLegacySeedFromBip39(bip39Seed);
|
|
expect(legacySeed, expectedLegacySeed0);
|
|
});
|
|
|
|
test("Get legacy Seed from bip39 with account index", () {
|
|
final legacySeed = getLegacySeedFromBip39(bip39Seed, accountIndex: 1);
|
|
expect(legacySeed, expectedLegacySeed1);
|
|
});
|
|
});
|
|
|
|
group("Test Wallet 2", () {
|
|
final bip39Seed = "color ranch color remove subway public water embrace before begin liberty fault";
|
|
final expectedLegacySeed0 = "somewhere problems gauze gigantic intended foxes upcoming saved waffle pipeline lurk bogeys empty wipeout abbey italics novelty tucks rafts elite lunar obnoxious awful bugs elite";
|
|
final expectedLegacySeed1 = "playful toxic wildly eluded mesh fainted february mugged maps repent vigilant hitched seventh threaten clue fetches sample diet number alkaline future cottage tuition vegan alkaline";
|
|
|
|
test("Get legacy Seed from bip39", () {
|
|
final legacySeed = getLegacySeedFromBip39(bip39Seed);
|
|
expect(legacySeed, expectedLegacySeed0);
|
|
});
|
|
|
|
test("Get legacy Seed from bip39 with account index", () {
|
|
final legacySeed = getLegacySeedFromBip39(bip39Seed, accountIndex: 1);
|
|
expect(legacySeed, expectedLegacySeed1);
|
|
});
|
|
});
|
|
|
|
});
|
|
}
|