Skip to content

Commit ea4767e

Browse files
committed
- delete trash from code
1 parent c3fa374 commit ea4767e

File tree

2 files changed

+1
-82
lines changed

2 files changed

+1
-82
lines changed

Commands/CommandQueryDataException.php

Lines changed: 1 addition & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -8,66 +8,5 @@
88

99
class CommandQueryDataException extends Exception
1010
{
11-
/** @var array */
12-
private $params = [];
13-
14-
// /**
15-
// * @param CommandInterface $command
16-
// * @return array
17-
// */
18-
// public function getCommandData(CommandInterface $command)
19-
// {
20-
// $queryData = [];
21-
// $params = $this->params;
22-
// $map = $command->getDataMap();
23-
// foreach ($map as $route) {
24-
// $routeParts = explode(':', $route);
25-
// foreach ($routeParts as $key) {
26-
// if ($key === '*') {
27-
// $data = $data;
28-
// } elseif (isset($data[$key])) {
29-
// $data[] = $data[$key];
30-
// } else {
31-
// $data = null;
32-
// break;
33-
// }
34-
// }
35-
// }
36-
//
37-
// return $this->params;
38-
// }
39-
40-
41-
public function getCommandData($data, $route, $rules)
42-
{
43-
$data = [];
44-
$routeParts = explode(':', $route);
45-
$values = self::getParamsListByKey($data, $routeParts);
46-
47-
foreach ($values as $route => $value) {
48-
foreach ($rules as $rule) {
49-
$this->validate($value, $rule);
50-
}
51-
if ($value !== null) {
52-
}
53-
}
54-
55-
return $this->params;
56-
}
57-
58-
59-
public function validate($value, $rule)
60-
{
61-
if ($rule === 'required') {
62-
if ($value === null) {
63-
64-
}
65-
}
66-
}
67-
68-
69-
public function getParamsListByKey($params, $routeParts = [])
70-
{
71-
72-
}
11+
//TODO FIXME check using of class
7312
}

Tools/Transaction.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,6 @@ public static function init(ConnectorInterface $connector)
6060
$commandQueryData,
6161
'result'
6262
);
63-
// $properties = [
64-
// 'head_block_number' => 17851646,
65-
// 'last_irreversible_block_num' => 17851627,
66-
// 'time' => '2017-12-06T15:29:00',
67-
// ];
6863

6964
if (self::CHAIN_GOLOS === $chainName) {
7065
$blockId = $properties['head_block_number'] - 2;
@@ -108,12 +103,6 @@ public static function init(ConnectorInterface $connector)
108103
if (!($tx instanceof CommandQueryDataInterface)) {
109104
throw new \Exception('cant init Tx');
110105
}
111-
// $properties2 = [
112-
// 'ref_block_num' => '25851',
113-
// 'ref_block_prefix' => '677597376',
114-
// 'expiration' => '2017-12-06T15:30:00.000',
115-
// ];
116-
// echo '<pre>' . var_dump($tx->getParams(), $properties2) . '<pre>'; //FIXME delete it
117106

118107
return $tx;
119108
}
@@ -132,15 +121,6 @@ public static function getTxMsg($chainName, CommandQueryDataInterface $trxData)
132121
$serBuffer = OperationSerializer::serializeTransaction($trxParams, new ByteBuffer());
133122
$serializedTx = self::getChainId($chainName) . bin2hex($serBuffer->read(0, $serBuffer->length()));
134123

135-
// echo "\n" . var_dump(
136-
// '$serializedTx'
137-
// ); //FIXME delete it
138-
// echo "\n" . var_dump(
139-
// $serializedTx,
140-
// '0000000000000000000000000000000000000000000000000000000000000000fb64c0506328f80c285a01000867756573743132330966697265706f77657254737465656d69742d76656e692d766964692d766963692d737465656d666573742d323031362d746f6765746865722d77652d6d6164652d69742d68617070656e2d7468616e6b2d796f752d737465656d69616e73102700',
141-
// $serializedTx === '0000000000000000000000000000000000000000000000000000000000000000fb64c0506328f80c285a01000867756573743132330966697265706f77657254737465656d69742d76656e692d766964692d766963692d737465656d666573742d323031362d746f6765746865722d77652d6d6164652d69742d68617070656e2d7468616e6b2d796f752d737465656d69616e73102700'
142-
// ); //FIXME delete it
143-
144124
return $serializedTx;
145125
}
146126

0 commit comments

Comments
 (0)