Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
silkaj
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
python
silkaj
Commits
d518ff94
Commit
d518ff94
authored
5 years ago
by
Moul
Browse files
Options
Downloads
Patches
Plain Diff
[enh]
#235
: tx: use Mutually exclusive for amount, amountUD, allSources options
parent
feba342d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
silkaj/tx.py
+23
-4
23 additions, 4 deletions
silkaj/tx.py
with
23 additions
and
4 deletions
silkaj/tx.py
+
23
−
4
View file @
d518ff94
...
...
@@ -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
"
)
@option
(
"
--amount
"
,
type
=
FloatRange
(
0.01
),
help
=
"
Quantitative value
"
,
cls
=
MutuallyExclusiveOption
,
mutually_exclusive
=
[
"
amountud
"
,
"
allsources
"
],
)
@option
(
"
--amountUD
"
,
type
=
float
,
help
=
"
Relative value
"
,
cls
=
MutuallyExclusiveOption
,
mutually_exclusive
=
[
"
amount
"
,
"
allsources
"
],
)
@option
(
"
--allSources
"
,
is_flag
=
True
,
help
=
"
Send all sources
"
,
cls
=
MutuallyExclusiveOption
,
mutually_exclusive
=
[
"
amount
"
,
"
amountud
"
],
)
@option
(
"
--output
"
,
required
=
True
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment