mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-02-02 03:06:35 +00:00
cleanup
This commit is contained in:
parent
47bf8cc7c1
commit
fe05f5a53d
1 changed files with 2 additions and 7 deletions
|
@ -124,8 +124,6 @@ class BitcoinWalletService extends WalletService<BitcoinNewWalletCredentials,
|
|||
final electrumClient = ElectrumClient();
|
||||
await electrumClient.connectToUri(node.uri);
|
||||
|
||||
print("@@@@@@@@@@@@@@");
|
||||
|
||||
for (DerivationType dType in bitcoin_derivations.keys) {
|
||||
if (dType == DerivationType.bip39) {
|
||||
for (DerivationInfo dInfo in bitcoin_derivations[dType]!) {
|
||||
|
@ -151,20 +149,17 @@ class BitcoinWalletService extends WalletService<BitcoinNewWalletCredentials,
|
|||
.address;
|
||||
break;
|
||||
case "p2wpkh-p2sh":
|
||||
// address = bitcoin.P
|
||||
default:
|
||||
address = wallet.address;
|
||||
break;
|
||||
}
|
||||
|
||||
print(
|
||||
"${dInfo.derivationType.toString()} : ${dInfo.derivationPath} : ${dInfo.script_type} : ${address}");
|
||||
// print(
|
||||
// "${dInfo.derivationType.toString()} : ${dInfo.derivationPath} : ${dInfo.script_type} : ${address}");
|
||||
|
||||
final sh = scriptHash(address!, networkType: bitcoin.bitcoin);
|
||||
final history = await electrumClient.getHistory(sh);
|
||||
|
||||
print(history);
|
||||
|
||||
final balance = await electrumClient.getBalance(sh);
|
||||
dInfo.balance = balance.entries.first.value.toString();
|
||||
dInfo.address = address;
|
||||
|
|
Loading…
Reference in a new issue