mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-03-15 16:12:16 +00:00
do not use wownero-seed (wow_seed) function for height, hardcoded POC
This commit is contained in:
parent
cb83515dbc
commit
6e5a0bad78
3 changed files with 7 additions and 15 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 371443607433a0ec509e2933ee21def29e9ad429
|
||||
Subproject commit da826f31352c695942bc9b821d1d0c82a9267ade
|
|
@ -713,8 +713,8 @@ class WowneroWallet extends CoinServiceAPI {
|
|||
final wallet = await _walletCreationService?.create(credentials);
|
||||
|
||||
// subtract a couple days to ensure we have a buffer for SWB
|
||||
final bufferedCreateHeight =
|
||||
getSeedHeightSync(wallet?.seed.trim() as String);
|
||||
final bufferedCreateHeight = 0;
|
||||
//final bufferedCreateHeight = getSeedHeightSync(wallet?.seed.trim() as String); // TODO use an alternative to wow_seed's get_seed_height
|
||||
|
||||
await DB.instance.put<dynamic>(
|
||||
boxName: walletId, key: "restoreHeight", value: bufferedCreateHeight);
|
||||
|
@ -969,7 +969,8 @@ class WowneroWallet extends CoinServiceAPI {
|
|||
await _secureStore.write(
|
||||
key: '${_walletId}_mnemonic', value: mnemonic.trim());
|
||||
|
||||
height = getSeedHeightSync(mnemonic.trim());
|
||||
height = 0;
|
||||
//height = getSeedHeightSync(mnemonic.trim()); // TODO use an alternative to wow_seed's get_seed_height
|
||||
|
||||
await DB.instance
|
||||
.put<dynamic>(boxName: walletId, key: "restoreHeight", value: height);
|
||||
|
|
|
@ -91,7 +91,7 @@ void main() async {
|
|||
final dirPath = await pathForWalletDir(name: name, type: type);
|
||||
path = await pathForWallet(name: name, type: type);
|
||||
credentials = wownero.createWowneroRestoreWalletFromSeedCredentials(
|
||||
name: name, height: 465760, mnemonic: testMnemonic14);
|
||||
name: name, height: 465760, mnemonic: testMnemonic14); // TODO catch failure
|
||||
|
||||
walletInfo = WalletInfo.external(
|
||||
id: WalletBase.idFor(name, type),
|
||||
|
@ -163,7 +163,7 @@ void main() async {
|
|||
final dirPath = await pathForWalletDir(name: name, type: type);
|
||||
path = await pathForWallet(name: name, type: type);
|
||||
credentials = wownero.createWowneroRestoreWalletFromSeedCredentials(
|
||||
name: name, height: 465760, mnemonic: testMnemonic25);
|
||||
name: name, height: 465760, mnemonic: testMnemonic25); // TODO catch failure
|
||||
|
||||
walletInfo = WalletInfo.external(
|
||||
id: WalletBase.idFor(name, type),
|
||||
|
@ -198,15 +198,6 @@ void main() async {
|
|||
name = 'namee${Random().nextInt(10000000)}';
|
||||
final dirPath = await pathForWalletDir(name: name, type: type);
|
||||
path = await pathForWallet(name: name, type: type);
|
||||
try {
|
||||
credentials = wownero.createWowneroRestoreWalletFromSeedCredentials(
|
||||
name: name, height: 465760, mnemonic: testMnemonic25);
|
||||
} catch (e, s) {
|
||||
print(e);
|
||||
print(s);
|
||||
hasThrown = true;
|
||||
}
|
||||
expect(hasThrown, false);
|
||||
|
||||
walletInfo = WalletInfo.external(
|
||||
id: WalletBase.idFor(name, type),
|
||||
|
|
Loading…
Reference in a new issue