Skip to content
GitLab
Explore
Sign in
Register
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
cd0fca29
Commit
cd0fca29
authored
8 years ago
by
Fabian Schuh
Browse files
Options
Downloads
Patches
Plain Diff
linting
parent
ddc637d3
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/__init__.py
+2
-1
2 additions, 1 deletion
bitshares/__init__.py
bitsharesapi/websocketprotocol.py
+7
-7
7 additions, 7 deletions
bitsharesapi/websocketprotocol.py
with
9 additions
and
8 deletions
bitshares/__init__.py
+
2
−
1
View file @
cd0fca29
__all__
=
[
'
dex
'
]
__all__
=
[
]
This diff is collapsed.
Click to expand it.
bitsharesapi/websocketprotocol.py
+
7
−
7
View file @
cd0fca29
...
...
@@ -44,12 +44,12 @@ class BitSharesWebsocketProtocol(WebSocketClientProtocol):
onEventCallbacks
=
{}
#: Registered APIs with corresponding API-IDs
api_ids
=
{}
api_ids
=
{}
#: Incremental Request ID and request storage (FIXME: request storage
#: is not cleaned up)
request_id
=
0
requests
=
{}
requests
=
{}
def
__init__
(
self
):
pass
...
...
@@ -67,7 +67,7 @@ class BitSharesWebsocketProtocol(WebSocketClientProtocol):
:param fnt callback: Callback to be executed upon receiption
of the answer (defaults to ``None``)
"""
request
=
{
"
request
"
:
{},
"
callback
"
:
None
}
request
=
{
"
request
"
:
{},
"
callback
"
:
None
}
request
[
"
id
"
]
=
self
.
_get_request_id
()
request
[
"
request
"
][
"
id
"
]
=
self
.
request_id
request
[
"
request
"
][
"
method
"
]
=
"
call
"
...
...
@@ -92,7 +92,7 @@ class BitSharesWebsocketProtocol(WebSocketClientProtocol):
:param int data: API id as returned by the server
"""
self
.
api_ids
.
update
({
name
:
data
})
self
.
api_ids
.
update
({
name
:
data
})
if
name
==
"
database
"
:
self
.
eventcallback
(
"
registered-database
"
)
elif
name
==
"
history
"
:
...
...
@@ -224,7 +224,7 @@ class BitSharesWebsocketProtocol(WebSocketClientProtocol):
oid
=
notice
[
"
id
"
]
[
inst
,
_type
,
_id
]
=
oid
.
split
(
"
.
"
)
account_ids
=
[]
for
a
in
self
.
accounts
:
for
a
in
self
.
accounts
:
account_ids
.
append
(
"
2.6.%s
"
%
a
.
split
(
"
.
"
)[
2
])
# account history
account_ids
.
append
(
"
1.2.%s
"
%
a
.
split
(
"
.
"
)[
2
])
# account
try
:
...
...
@@ -365,12 +365,12 @@ class BitSharesWebsocketProtocol(WebSocketClientProtocol):
"
Use client.ws.get_account_history() instead
"
,
DeprecationWarning
)
if
account_id
[
0
:
4
]
==
"
1.2.
"
:
if
account_id
[
0
:
4
]
==
"
1.2.
"
:
self
.
wsexec
([
self
.
api_ids
[
"
history
"
],
"
get_account_history
"
,
[
account_id
,
start
,
100
,
stop
]],
callback
)
else
:
else
:
raise
ValueError
(
"
getAccountHistory expects an account
"
+
"
id of the form
'
1.2.x
'
!
"
)
...
...
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