qrlnode.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:QRL 作者: theQRL 项目源码 文件源码
def get_dec_amount(str_amount_arg: str) -> Decimal:
        # FIXME: Concentrating logic into a single point. Fix this, make type safe to avoid confusion. Quantity formats should be always clear
        # FIXME: Review. This is just relocated code. It looks odd
        # FIXME: Antipattern. Magic number.
        # FIXME: Validate string, etc.
        return decimal.Decimal(decimal.Decimal(str_amount_arg) * 100000000).quantize(decimal.Decimal('1'),
                                                                                     rounding=decimal.ROUND_HALF_UP)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号