Skip to content

Commit

Permalink
upd Transaction.php
Browse files Browse the repository at this point in the history
commands namespace was updated to Single
deprecated code was deleted
  • Loading branch information
t3ran13 committed Apr 2, 2018
1 parent 8d94c73 commit 50de4e3
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions Tools/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

use GrapheneNodeClient\Commands\CommandQueryData;
use GrapheneNodeClient\Commands\CommandQueryDataInterface;
use GrapheneNodeClient\Commands\DataBase\GetBlockCommand;
use GrapheneNodeClient\Commands\DataBase\GetDynamicGlobalPropertiesCommand;
use GrapheneNodeClient\Commands\Login\LoginCommand;
use GrapheneNodeClient\Commands\Single\GetBlockCommand;
use GrapheneNodeClient\Commands\Single\GetDynamicGlobalPropertiesCommand;
use GrapheneNodeClient\Commands\Single\LoginCommand;
use GrapheneNodeClient\Connectors\ConnectorInterface;
use GrapheneNodeClient\Tools\ChainOperations\OperationSerializer;
use t3ran13\ByteBuffer\ByteBuffer;
Expand Down Expand Up @@ -43,17 +43,6 @@ public static function init(ConnectorInterface $connector)
$tx = null;
$chainName = $connector->getPlatform();

$command = new LoginCommand($connector);
$commandQueryData = new CommandQueryData();
$commandQueryData->setParams(
['', '']
);
$isLogin = $command->execute(
$commandQueryData,
'result'
);

if ($isLogin === true) {
$command = new GetDynamicGlobalPropertiesCommand($connector);
$commandQueryData = new CommandQueryData();
$properties = $command->execute(
Expand Down Expand Up @@ -98,7 +87,6 @@ public static function init(ConnectorInterface $connector)
]]
);
}
}

if (!($tx instanceof CommandQueryDataInterface)) {
throw new \Exception('cant init Tx');
Expand Down

0 comments on commit 50de4e3

Please sign in to comment.