vdbelt/ftx-php

depositAddress could not delivery method.

dreamwalter opened this issue · 2 comments

$ftx->wallet()->depositAddress('USDT') just show method: omni.
I changed the depositAddress function in Wallet.php as following.

public function depositAddress(string $coin, string $method = "")
{
  if (empty($method))
    return $this->respond($this->http->get(self::WALLET_DEPOSIT_ADDRESS_URI.'/'.$coin));
  else {
    return $this->respond($this->http->get(self::WALLET_DEPOSIT_ADDRESS_URI.'/'.$coin.'?method='.$method));
  }
}

example.php
print_r($ftx->wallet()->depositAddress('USDT','trx'))

It seems not working. Could you help me?

public function depositAddress(string $coin, ?string $method = null) {
return $this->respond($this->http->get(self::WALLET_DEPOSIT_ADDRESS_URI.'/'.$coin, compact('method')));
}
It seems okay after checking.

Thanks! I have tagged a new release with this functionality.