mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-22 18:44:31 +00:00
reserved address flag
This commit is contained in:
parent
3e2eb2a7c7
commit
2ce3bac497
1 changed files with 4 additions and 106 deletions
|
@ -301,105 +301,6 @@ mixin FusionWalletInterface {
|
||||||
network:
|
network:
|
||||||
_coin.isTestNet ? fusion.Utilities.testNet : fusion.Utilities.mainNet,
|
_coin.isTestNet ? fusion.Utilities.testNet : fusion.Utilities.mainNet,
|
||||||
);
|
);
|
||||||
//print ("DEBUG FUSION bitcoincash_wallet.dart 1202");
|
|
||||||
|
|
||||||
// TODO remove or fix code below.
|
|
||||||
|
|
||||||
/*
|
|
||||||
print("DEBUG: Waiting for any potential incoming data...");
|
|
||||||
try {
|
|
||||||
await Future.delayed(Duration(seconds: 5)); // wait for 5 seconds
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
print (e);
|
|
||||||
}
|
|
||||||
print("DEBUG: Done waiting.");
|
|
||||||
|
|
||||||
bool mydebug1 = false;
|
|
||||||
if (mydebug1 == true) {
|
|
||||||
var serverIp = '167.114.119.46';
|
|
||||||
var serverPort = 8787;
|
|
||||||
|
|
||||||
List<int> frame = [
|
|
||||||
118,
|
|
||||||
91,
|
|
||||||
232,
|
|
||||||
180,
|
|
||||||
228,
|
|
||||||
57,
|
|
||||||
109,
|
|
||||||
207,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
45,
|
|
||||||
10,
|
|
||||||
43,
|
|
||||||
10,
|
|
||||||
7,
|
|
||||||
97,
|
|
||||||
108,
|
|
||||||
112,
|
|
||||||
104,
|
|
||||||
97,
|
|
||||||
49,
|
|
||||||
51,
|
|
||||||
18,
|
|
||||||
32,
|
|
||||||
111,
|
|
||||||
226,
|
|
||||||
140,
|
|
||||||
10,
|
|
||||||
182,
|
|
||||||
241,
|
|
||||||
179,
|
|
||||||
114,
|
|
||||||
193,
|
|
||||||
166,
|
|
||||||
162,
|
|
||||||
70,
|
|
||||||
174,
|
|
||||||
99,
|
|
||||||
247,
|
|
||||||
79,
|
|
||||||
147,
|
|
||||||
30,
|
|
||||||
131,
|
|
||||||
101,
|
|
||||||
225,
|
|
||||||
90,
|
|
||||||
8,
|
|
||||||
156,
|
|
||||||
104,
|
|
||||||
214,
|
|
||||||
25,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
];
|
|
||||||
print("lets try to connect to a socket again");
|
|
||||||
var socket = await Socket.connect(serverIp, serverPort);
|
|
||||||
|
|
||||||
print('Connected to the server.');
|
|
||||||
socket.add(frame);
|
|
||||||
print('Sent frame: $frame');
|
|
||||||
|
|
||||||
socket.listen((data) {
|
|
||||||
print('Received from server: $data');
|
|
||||||
}, onDone: () {
|
|
||||||
print('Server closed connection.');
|
|
||||||
socket.destroy();
|
|
||||||
}, onError: (error) {
|
|
||||||
print('Error: $error');
|
|
||||||
socket.destroy();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// await _checkCurrentChangeAddressesForTransactions();
|
|
||||||
// await _checkCurrentReceivingAddressesForTransactions();
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> refreshFusion() {
|
Future<void> refreshFusion() {
|
||||||
|
@ -417,9 +318,12 @@ extension FusionAddress on Address {
|
||||||
// TODO calculate a derivation path if it is null.
|
// TODO calculate a derivation path if it is null.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final bool fusionReserved = otherData == kReservedFusionAddress;
|
||||||
|
|
||||||
return fusion.Address(
|
return fusion.Address(
|
||||||
address: value,
|
address: value,
|
||||||
publicKey: publicKey,
|
publicKey: publicKey,
|
||||||
|
fusionReserved: fusionReserved,
|
||||||
derivationPath: fusion.DerivationPath(
|
derivationPath: fusion.DerivationPath(
|
||||||
derivationPath?.value ?? "", // TODO fix null derivation path.
|
derivationPath?.value ?? "", // TODO fix null derivation path.
|
||||||
),
|
),
|
||||||
|
@ -503,13 +407,7 @@ extension FusionUTXO on UTXO {
|
||||||
}
|
}
|
||||||
|
|
||||||
return fusion.Output(
|
return fusion.Output(
|
||||||
addr: fusion.Address(
|
addr: addr.toFusionAddress(),
|
||||||
address: address!,
|
|
||||||
publicKey: addr.publicKey,
|
|
||||||
derivationPath: fusion.DerivationPath(
|
|
||||||
addr.derivationPath!.value,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
value: value,
|
value: value,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue