From 6469a6e7dc3e1076e5d4d753b2e40ef03fa889bd Mon Sep 17 00:00:00 2001 From: parodyBit Date: Tue, 12 Dec 2023 06:52:54 -0700 Subject: [PATCH] fix: run dart format and analyze --- example/stake_transaction_example.dart | 21 ++++++++++--------- lib/src/network/explorer/explorer_client.dart | 15 ------------- 2 files changed, 11 insertions(+), 25 deletions(-) diff --git a/example/stake_transaction_example.dart b/example/stake_transaction_example.dart index 2909cfa..3aa4f6f 100644 --- a/example/stake_transaction_example.dart +++ b/example/stake_transaction_example.dart @@ -1,4 +1,4 @@ -import 'package:witnet/node.dart'; +// import 'package:witnet/node.dart'; import 'package:witnet/schema.dart'; import 'package:witnet/src/constants.dart'; import 'package:witnet/src/utils/transformations/transformations.dart'; @@ -16,16 +16,16 @@ void main() async { Xprv masterNode = Xprv.fromXprv( "xprv1qpujxsyd4hfu0dtwa524vac84e09mjsgnh5h9crl8wrqg58z5wmsuqqcxlqmar3fjhkprndzkpnp2xlze76g4hu7g7c4r4r2m2e6y8xlvu566tn6"); - Xprv withdrawer = - masterNode - / KEYPATH_PURPOSE - / KEYPATH_COIN_TYPE - / KEYPATH_ACCOUNT - / EXTERNAL_KEYCHAIN - / 0; - + Xprv withdrawer = masterNode / + KEYPATH_PURPOSE / + KEYPATH_COIN_TYPE / + KEYPATH_ACCOUNT / + EXTERNAL_KEYCHAIN / + 0; + /// The 20 byte Public Key Hash of the withdrawer String pkh = bytesToHex(withdrawer.privateKey.publicKey.publicKeyHash); + /// The authorization by the node KeyedSignature authorization = signHash(pkh, masterNode.privateKey); @@ -42,7 +42,8 @@ void main() async { /// build and sign stake transaction StakeTransaction stake = StakeTransaction( - body: body, signatures: [signHash(body.transactionId, masterNode.privateKey)]); + body: body, + signatures: [signHash(body.transactionId, masterNode.privateKey)]); /// The Stake Transaction ID print(stake.transactionID); diff --git a/lib/src/network/explorer/explorer_client.dart b/lib/src/network/explorer/explorer_client.dart index 81a8e9b..93e1492 100644 --- a/lib/src/network/explorer/explorer_client.dart +++ b/lib/src/network/explorer/explorer_client.dart @@ -7,21 +7,6 @@ import 'dart:io' show HttpException; import 'package:witnet/data_structures.dart' show Utxo; import 'package:witnet/explorer.dart'; import 'package:witnet/schema.dart'; -import 'explorer_api.dart' - show - AddressBlocks, - AddressDataRequestsSolved, - AddressDetails, - AddressValueTransfers, - BlockDetails, - Blockchain, - ExplorerException, - Home, - MintInfo, - Network, - PrioritiesEstimate, - Status, - Tapi; enum ExplorerMode { production,