mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-24 12:29:37 +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,
|
walletId: walletId,
|
||||||
coin: coin,
|
coin: coin,
|
||||||
db: db,
|
db: db,
|
||||||
getCurrentChangeAddress: () => currentChangeAddress);
|
getCurrentChangeAddress: () => currentChangeAddress,
|
||||||
|
getNextChangeAddress: () => nextChangeAddress);
|
||||||
initCoinControlInterface(
|
initCoinControlInterface(
|
||||||
walletId: walletId,
|
walletId: walletId,
|
||||||
walletName: walletName,
|
walletName: walletName,
|
||||||
|
|
|
@ -17,17 +17,20 @@ mixin FusionInterface {
|
||||||
|
|
||||||
// passed in wallet functions
|
// passed in wallet functions
|
||||||
late final Future<String> Function() _getCurrentChangeAddress;
|
late final Future<String> Function() _getCurrentChangeAddress;
|
||||||
|
late final Future<String> Function() _getNextChangeAddress;
|
||||||
|
|
||||||
void initFusionInterface({
|
void initFusionInterface({
|
||||||
required String walletId,
|
required String walletId,
|
||||||
required Coin coin,
|
required Coin coin,
|
||||||
required MainDB db,
|
required MainDB db,
|
||||||
required Future<String> Function() getCurrentChangeAddress,
|
required Future<String> Function() getCurrentChangeAddress,
|
||||||
|
required Future<String> Function() getNextChangeAddress,
|
||||||
}) {
|
}) {
|
||||||
_walletId = walletId;
|
_walletId = walletId;
|
||||||
_coin = coin;
|
_coin = coin;
|
||||||
_db = db;
|
_db = db;
|
||||||
_getCurrentChangeAddress = getCurrentChangeAddress;
|
_getCurrentChangeAddress = getCurrentChangeAddress;
|
||||||
|
_getNextChangeAddress = getNextChangeAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<Address> reserve_change_addresses(int number_addresses) {
|
static List<Address> reserve_change_addresses(int number_addresses) {
|
||||||
|
@ -44,7 +47,8 @@ mixin FusionInterface {
|
||||||
|
|
||||||
void fuse() async {
|
void fuse() async {
|
||||||
// Initial attempt for CashFusion integration goes here.
|
// Initial attempt for CashFusion integration goes here.
|
||||||
Fusion mainFusionObject = Fusion();
|
Fusion mainFusionObject =
|
||||||
|
Fusion(generateChangeAddress: () => _getNextChangeAddress());
|
||||||
|
|
||||||
// add stack utxos
|
// add stack utxos
|
||||||
List<UTXO> utxos = await _db.getUTXOs(_walletId).findAll();
|
List<UTXO> utxos = await _db.getUTXOs(_walletId).findAll();
|
||||||
|
|
Loading…
Reference in a new issue