/**
  * @param Address $address
  * @param BlockCypherAddressBalance $blockCypherAddressBalance
  * @param string $apiUrl
  * @param string $explorerUrl
  * @return $this
  */
 public static function from(Address $address, BlockCypherAddressBalance $blockCypherAddressBalance, $apiUrl, $explorerUrl)
 {
     $addressListItemDto = new self();
     $addressListItemDto->setAddress($address->getAddress());
     $addressListItemDto->setTag($address->getTag());
     $addressListItemDto->setCreationTime($address->getCreationTime());
     $addressListItemDto->setFinalBalance($blockCypherAddressBalance->getFinalBalance());
     $addressListItemDto->setNTx($blockCypherAddressBalance->getNTx());
     $addressListItemDto->setApiUrl($apiUrl);
     $addressListItemDto->setExplorerUrl($explorerUrl);
     return $addressListItemDto;
 }
Пример #2
0
 /**
  * @param Address $address
  * @return bool
  */
 public function equals(Address $address)
 {
     if ($this->id->equals($address->getId())) {
         return true;
     } else {
         return false;
     }
 }
 /**
  * @param Address $address
  * @throws \Exception
  */
 public function delete(Address $address)
 {
     $this->encryptedAddressRepository->delete($address->encryptUsing($this->encryptor));
 }