mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
WIP pass address generation function in
This commit is contained in:
parent
e00208b0f0
commit
221c4e3fb7
3 changed files with 8 additions and 3 deletions
|
@ -1 +1 @@
|
|||
Subproject commit ad107a683cfdf72040270921062fc6f43ae63f6b
|
||||
Subproject commit c021a3e8fb815850de6ef655da360acfde34acf2
|
|
@ -139,7 +139,8 @@ class BitcoinCashWallet extends CoinServiceAPI
|
|||
walletId: walletId,
|
||||
coin: coin,
|
||||
db: db,
|
||||
getCurrentChangeAddress: () => currentChangeAddress);
|
||||
getCurrentChangeAddress: () => currentChangeAddress,
|
||||
getNextChangeAddress: () => nextChangeAddress);
|
||||
initCoinControlInterface(
|
||||
walletId: walletId,
|
||||
walletName: walletName,
|
||||
|
|
|
@ -17,17 +17,20 @@ mixin FusionInterface {
|
|||
|
||||
// passed in wallet functions
|
||||
late final Future<String> Function() _getCurrentChangeAddress;
|
||||
late final Future<String> Function() _getNextChangeAddress;
|
||||
|
||||
void initFusionInterface({
|
||||
required String walletId,
|
||||
required Coin coin,
|
||||
required MainDB db,
|
||||
required Future<String> Function() getCurrentChangeAddress,
|
||||
required Future<String> Function() getNextChangeAddress,
|
||||
}) {
|
||||
_walletId = walletId;
|
||||
_coin = coin;
|
||||
_db = db;
|
||||
_getCurrentChangeAddress = getCurrentChangeAddress;
|
||||
_getNextChangeAddress = getNextChangeAddress;
|
||||
}
|
||||
|
||||
static List<Address> reserve_change_addresses(int number_addresses) {
|
||||
|
@ -44,7 +47,8 @@ mixin FusionInterface {
|
|||
|
||||
void fuse() async {
|
||||
// Initial attempt for CashFusion integration goes here.
|
||||
Fusion mainFusionObject = Fusion();
|
||||
Fusion mainFusionObject =
|
||||
Fusion(generateChangeAddress: () => _getNextChangeAddress());
|
||||
|
||||
// add stack utxos
|
||||
List<UTXO> utxos = await _db.getUTXOs(_walletId).findAll();
|
||||
|
|
Loading…
Reference in a new issue