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
9f7b220c
Commit
9f7b220c
authored
8 years ago
by
Fabian Schuh
Browse files
Options
Downloads
Patches
Plain Diff
[transactionbuilder] renamed
parent
e3bbd244
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bitshares/bitshares.py
+2
-2
2 additions, 2 deletions
bitshares/bitshares.py
bitshares/transactionbuilder.py
+5
-4
5 additions, 4 deletions
bitshares/transactionbuilder.py
with
7 additions
and
6 deletions
bitshares/bitshares.py
+
2
−
2
View file @
9f7b220c
...
@@ -18,7 +18,7 @@ from .exceptions import (
...
@@ -18,7 +18,7 @@ from .exceptions import (
MissingKeyError
,
MissingKeyError
,
)
)
from
.wallet
import
Wallet
from
.wallet
import
Wallet
from
.transaction
import
Transaction
from
.transaction
builder
import
Transaction
Builder
log
=
logging
.
getLogger
(
__name__
)
log
=
logging
.
getLogger
(
__name__
)
...
@@ -148,7 +148,7 @@ class BitShares(object):
...
@@ -148,7 +148,7 @@ class BitShares(object):
self
.
wallet
.
newWallet
()
self
.
wallet
.
newWallet
()
def
finalizeOp
(
self
,
op
,
account
,
permission
):
def
finalizeOp
(
self
,
op
,
account
,
permission
):
tx
=
Transaction
()
tx
=
Transaction
Builder
()
tx
.
appendOps
(
op
)
tx
.
appendOps
(
op
)
tx
.
appendSigner
(
account
,
permission
)
tx
.
appendSigner
(
account
,
permission
)
tx
.
constructTx
()
tx
.
constructTx
()
...
...
This diff is collapsed.
Click to expand it.
bitshares/transaction.py
→
bitshares/transaction
builder
.py
+
5
−
4
View file @
9f7b220c
...
@@ -12,8 +12,9 @@ import logging
...
@@ -12,8 +12,9 @@ import logging
log
=
logging
.
getLogger
(
__name__
)
log
=
logging
.
getLogger
(
__name__
)
class
Transaction
(
dict
):
class
TransactionBuilder
(
dict
):
def
__init__
(
self
,
bitshares_instance
=
None
):
def
__init__
(
self
,
tx
=
None
,
bitshares_instance
=
None
):
if
not
bitshares_instance
:
if
not
bitshares_instance
:
bitshares_instance
=
bts
.
BitShares
()
bitshares_instance
=
bts
.
BitShares
()
self
.
bitshares
=
bitshares_instance
self
.
bitshares
=
bitshares_instance
...
@@ -22,7 +23,7 @@ class Transaction(dict):
...
@@ -22,7 +23,7 @@ class Transaction(dict):
self
.
wifs
=
[]
self
.
wifs
=
[]
if
not
isinstance
(
tx
,
dict
):
if
not
isinstance
(
tx
,
dict
):
raise
ValueError
(
"
Invalid Transaction Format
"
)
raise
ValueError
(
"
Invalid Transaction Format
"
)
super
(
Transaction
,
self
).
__init__
(
tx
)
super
(
Transaction
Builder
,
self
).
__init__
(
tx
)
def
appendOps
(
self
,
ops
):
def
appendOps
(
self
,
ops
):
if
isinstance
(
ops
,
list
):
if
isinstance
(
ops
,
list
):
...
@@ -59,7 +60,7 @@ class Transaction(dict):
...
@@ -59,7 +60,7 @@ class Transaction(dict):
expiration
=
expiration
,
expiration
=
expiration
,
operations
=
ops
operations
=
ops
)
)
super
(
Transaction
,
self
).
__init__
(
tx
.
json
())
super
(
Transaction
Builder
,
self
).
__init__
(
tx
.
json
())
def
sign
(
self
):
def
sign
(
self
):
"""
Sign a provided transaction witht he provided key(s)
"""
Sign a provided transaction witht he provided key(s)
...
...
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