Mise à jour de GitLab prévue ce samedi 23 janvier 2021 à partir de 9h00 CEST | GitLab upgrade planned this Saturday 23th 2021 from 9:00 AM CEST

Commit 2f32d914 authored by Moul's avatar Moul

[enh] #235: tx: use Mutually exclusive for amount, amountUD, allSources options

parent 4d532878
......@@ -18,9 +18,10 @@ along with Silkaj. If not, see <https://www.gnu.org/licenses/>.
from re import compile, search
import math
from time import sleep
from tabulate import tabulate
from click import command, option, FloatRange
from tabulate import tabulate
from silkaj.cli_tools import MutuallyExclusiveOption
from silkaj.network_tools import ClientInstance, HeadBlock
from silkaj.crypto_tools import check_public_key
from silkaj.tools import message_exit, CurrencySymbol, coroutine
......@@ -40,9 +41,27 @@ from duniterpy.documents.transaction import OutputSource, Unlock, SIGParameter
@command("tx", help="Send transaction")
@option("--amount", type=FloatRange(0.01), help="Quantitative value")
@option("--amountUD", type=float, help="Relative value")
@option("--allSources", is_flag=True, help="Send all sources")
help="Quantitative value",
mutually_exclusive=["amountud", "allsources"],
help="Relative value",
mutually_exclusive=["amount", "allsources"],
help="Send all sources",
mutually_exclusive=["amount", "amountud"],
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment