Skip to content

Commit

Permalink
fix matcher usage
Browse files Browse the repository at this point in the history
  • Loading branch information
deemru committed Dec 3, 2019
1 parent 55ec4f5 commit 0f567f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/WavesKit.php
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ public function txOrderBroadcast( $tx )
{
$this->setDefaultMatcher();

if( false === ( $json = $this->fetch( '/matcher/orderbook', true, json_encode( $tx ) ) ) )
if( false === ( $json = $this->matcher->fetch( '/matcher/orderbook', true, json_encode( $tx ) ) ) )
return false;

if( null === ( $json = $this->json_decode( $json ) ) )
Expand Down Expand Up @@ -1110,7 +1110,7 @@ public function txOrderCancel( $tx )
$amountAsset = isset( $tx['assetPair']['amountAsset'] ) ? $tx['assetPair']['amountAsset'] : 'WAVES';
$priceAsset = isset( $tx['assetPair']['priceAsset'] ) ? $tx['assetPair']['priceAsset'] : 'WAVES';

if( false === ( $json = $this->fetch( "/matcher/orderbook/$amountAsset/$priceAsset/cancel", true, json_encode( $cancel ) ) ) )
if( false === ( $json = $this->matcher->fetch( '/matcher/orderbook/' . $amountAsset . '/' . $priceAsset . '/cancel', true, json_encode( $cancel ) ) ) )
return false;

if( null === ( $json = $this->json_decode( $json ) ) )
Expand Down Expand Up @@ -1139,7 +1139,7 @@ public function getOrders( $activeOnly = true )
$headers = [ 'Timestamp: ' . $timestamp, 'Signature: ' . $signature ];

$activeOnly = '?activeOnly=' . ( $activeOnly ? 'true' : 'false' );
if( false === ( $json = $this->fetch( '/matcher/orderbook/' . $this->getPublicKey() . $activeOnly, false, null, null, $headers ) ) )
if( false === ( $json = $this->matcher->fetch( '/matcher/orderbook/' . $this->getPublicKey() . $activeOnly, false, null, null, $headers ) ) )
return false;

if( null === ( $json = $this->json_decode( $json ) ) )
Expand Down

0 comments on commit 0f567f3

Please sign in to comment.