From 9b63be001d4d50074b11e377e8a0ff743c1b97d1 Mon Sep 17 00:00:00 2001 From: Ekliptor Date: Tue, 29 Sep 2020 05:13:25 +0700 Subject: [PATCH] fixed BCHD API token amounts --- src/BlockchainApi/BchdProtoGatewayApi.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BlockchainApi/BchdProtoGatewayApi.php b/src/BlockchainApi/BchdProtoGatewayApi.php index e4411d1..2863810 100644 --- a/src/BlockchainApi/BchdProtoGatewayApi.php +++ b/src/BlockchainApi/BchdProtoGatewayApi.php @@ -151,7 +151,7 @@ public function getSlpAddressDetails(string $address, string $tokenID): ?SlpToke $slpAddress->balance += (int)$output->slp_token->amount; } if ($slpAddress->decimals > 0) - $slpAddress->balance /= $slpAddress->decimals; + $slpAddress->balance /= pow(10, $slpAddress->decimals); $slpAddress->transactions = $this->getAddressTransactions($address); return $slpAddress;