Skip to content

Commit

Permalink
Token: ensure we're passing int
Browse files Browse the repository at this point in the history
  • Loading branch information
kornrunner committed Dec 7, 2020
1 parent e16ac97 commit 419ae89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Ethereum/Token.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private function sanitizeHex(string $hex): string {
private static function bcdechex(string $dec): string {
$end = bcmod($dec, '16');
$remainder = bcdiv(bcsub($dec, $end), '16');
return $remainder == 0 ? dechex($end) : static::bcdechex($remainder) . dechex($end);
return $remainder == 0 ? dechex((int) $end) : static::bcdechex($remainder) . dechex((int) $end);
}

}
}

0 comments on commit 419ae89

Please sign in to comment.