Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
6 changes: 3 additions & 3 deletions lib/wallets/wallet/impl/xelis_wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class XelisWallet extends LibXelisWallet {
seed: mnemonic,
network: cryptoCurrency.network,
precomputedTablesPath: tablePath,
l1Low: tableState.currentSize.isLow,
stack_l1Low: tableState.currentSize.isLow,
);

await secureStorageInterface.write(
Expand Down Expand Up @@ -91,7 +91,7 @@ class XelisWallet extends LibXelisWallet {
password: password,
network: cryptoCurrency.network,
precomputedTablesPath: tablePath,
l1Low: tableState.currentSize.isLow,
stack_l1Low: tableState.currentSize.isLow,
);

final mnemonic = await libXelis.getSeed(wallet);
Expand Down Expand Up @@ -123,7 +123,7 @@ class XelisWallet extends LibXelisWallet {
password: password!,
network: cryptoCurrency.network,
precomputedTablesPath: tablePath,
l1Low: tableState.currentSize.isLow,
stack_l1Low: tableState.currentSize.isLow,
);

await _finishInit();
Expand Down
3 changes: 1 addition & 2 deletions lib/wallets/wallet/intermediate/lib_xelis_wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,10 @@ extension XelisTableManagement on LibXelisWallet {

try {
Logging.instance.i("Xelis: Generating large tables in background");

final tablePath = await getPrecomputedTablesPath();
await libXelis.updateTables(
precomputedTablesPath: tablePath,
l1Low: state.desiredSize.isLow,
stack_l1Low: state.desiredSize.isLow,
);

await setTableState(
Expand Down
10 changes: 6 additions & 4 deletions lib/wl_gen/interfaces/lib_xelis_interface.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/foundation.dart';

import '../../providers/progress_report/xelis_table_progress_provider.dart';
import '../../wallets/crypto_currency/crypto_currency.dart';

Expand Down Expand Up @@ -32,7 +32,7 @@ abstract class LibXelisInterface {

Future<void> updateTables({
required String precomputedTablesPath,
required bool l1Low,
required bool stack_l1Low,
});

Future<String> getSeed(OpaqueXelisWallet wallet);
Expand All @@ -46,7 +46,7 @@ abstract class LibXelisInterface {
String? seed,
String? privateKey,
String? precomputedTablesPath,
bool? l1Low,
bool? stack_l1Low,
});

Future<OpaqueXelisWallet> openXelisWallet(
Expand All @@ -56,7 +56,7 @@ abstract class LibXelisInterface {
required String password,
required CryptoCurrencyNetwork network,
String? precomputedTablesPath,
bool? l1Low,
bool? stack_l1Low,
});

String getAddress(OpaqueXelisWallet wallet);
Expand Down Expand Up @@ -225,6 +225,8 @@ enum XelisTableSize {
low,
full;

// TODO: add more granular table size management interface
// for now, just patching the old system into the new FFI API
bool get isLow => this == XelisTableSize.low;

static XelisTableSize get platformDefault {
Expand Down
Loading
Loading