cryptom2/currency-precision

处理加密货币货币精度的辅助模块

v1.0.0 2022-06-21 05:37 UTC

This package is auto-updated.

Last update: 2024-09-21 10:34:10 UTC


README

描述

模块管理自定义货币精度,并增加了更改默认货币精度的可能性。

安装

要安装模块,您需要将存储库添加到您的 composer.json

    "repositories": {
        "crypto-currency-precision": {
            "type": "git",
            "url": "git@github.com:torys877/crypto-currency-precision.git"
        }
    }

或者在控制台中添加存储库

composer config repositories.crypto-currency-precision git git@github.com:torys877/crypto-currency-precision.git

安装模块

composer require cryptom2/currency-precision:v1.0.0

并运行

php bin/magento setup:upgrade

使用示例

要设置精度,需要在 etc 模块目录中创建 config.xml 并添加以下配置

<default>
    <system>
        <currency>
            <ETH>
                <precision>5</precision>
            </ETH>
        </currency>
    </system>
</default>`

作者

Ihor Oleksiienko