Skip to content

Commit

Permalink
throw exception on missing SLP token decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekliptor committed Oct 6, 2020
1 parent a514fbe commit dec731e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/BlockchainApi/BchdProtoGatewayApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ protected function addTokenMetadata(SlpToken $token, array $bchdTokenMetadata):
if (isset($typeInfo->decimals)) // not present with all tokens
$token->decimals = $typeInfo->decimals;
else
$token->decimals = 9;
//$token->decimals = 9;
throw new \Exception("SLP token must return number of decimals from BCHD - tokenID: $id");

// add the token type
if (isset($meta->type1))
Expand Down

0 comments on commit dec731e

Please sign in to comment.