Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
beem
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
beem
Commits
6fd858a3
Commit
6fd858a3
authored
6 years ago
by
Holger
Browse files
Options
Downloads
Patches
Plain Diff
Add custom chains function to signed transactions
parent
d6ef31aa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
beem/transactionbuilder.py
+2
-1
2 additions, 1 deletion
beem/transactionbuilder.py
beembase/signedtransactions.py
+6
-0
6 additions, 0 deletions
beembase/signedtransactions.py
with
8 additions
and
1 deletion
beem/transactionbuilder.py
+
2
−
1
View file @
6fd858a3
...
@@ -291,7 +291,8 @@ class TransactionBuilder(dict):
...
@@ -291,7 +291,8 @@ class TransactionBuilder(dict):
operations
.
default_prefix
=
self
[
"
blockchain
"
][
"
prefix
"
]
operations
.
default_prefix
=
self
[
"
blockchain
"
][
"
prefix
"
]
try
:
try
:
signedtx
=
Signed_Transaction
(
**
self
.
json
().
update
(
custom_chains
=
self
.
steem
.
custom_chains
))
signedtx
=
Signed_Transaction
(
**
self
.
json
())
signedtx
.
add_custom_chains
(
self
.
steem
.
custom_chains
)
except
:
except
:
raise
ValueError
(
"
Invalid TransactionBuilder Format
"
)
raise
ValueError
(
"
Invalid TransactionBuilder Format
"
)
...
...
This diff is collapsed.
Click to expand it.
beembase/signedtransactions.py
+
6
−
0
View file @
6fd858a3
...
@@ -29,6 +29,12 @@ class Signed_Transaction(GrapheneSigned_Transaction):
...
@@ -29,6 +29,12 @@ class Signed_Transaction(GrapheneSigned_Transaction):
self
.
known_chains
[
c
]
=
custom_chain
[
c
]
self
.
known_chains
[
c
]
=
custom_chain
[
c
]
super
(
Signed_Transaction
,
self
).
__init__
(
*
args
,
**
kwargs
)
super
(
Signed_Transaction
,
self
).
__init__
(
*
args
,
**
kwargs
)
def
add_custom_chains
(
self
,
custom_chain
):
if
len
(
custom_chain
)
>
0
:
for
c
in
custom_chain
:
if
c
not
in
self
.
known_chains
:
self
.
known_chains
[
c
]
=
custom_chain
[
c
]
def
sign
(
self
,
wifkeys
,
chain
=
u
"
STEEM
"
):
def
sign
(
self
,
wifkeys
,
chain
=
u
"
STEEM
"
):
return
super
(
Signed_Transaction
,
self
).
sign
(
wifkeys
,
chain
)
return
super
(
Signed_Transaction
,
self
).
sign
(
wifkeys
,
chain
)
...
...
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