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
ff741940
Commit
ff741940
authored
6 years ago
by
Holger
Browse files
Options
Downloads
Patches
Plain Diff
Removed asset_precision and used precision from beemgraphenebase.chains instead
parent
5dc0af37
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
beemapi/steemnoderpc.py
+0
-1
0 additions, 1 deletion
beemapi/steemnoderpc.py
beembase/objects.py
+11
-11
11 additions, 11 deletions
beembase/objects.py
beemgraphenebase/objects.py
+0
-1
0 additions, 1 deletion
beemgraphenebase/objects.py
with
11 additions
and
13 deletions
beemapi/steemnoderpc.py
+
0
−
1
View file @
ff741940
...
@@ -6,7 +6,6 @@ from builtins import bytes, int, str
...
@@ -6,7 +6,6 @@ from builtins import bytes, int, str
import
re
import
re
import
sys
import
sys
from
.graphenerpc
import
GrapheneRPC
from
.graphenerpc
import
GrapheneRPC
from
beemgraphenebase.chains
import
known_chains
from
.
import
exceptions
from
.
import
exceptions
import
logging
import
logging
log
=
logging
.
getLogger
(
__name__
)
log
=
logging
.
getLogger
(
__name__
)
...
...
This diff is collapsed.
Click to expand it.
beembase/objects.py
+
11
−
11
View file @
ff741940
...
@@ -19,27 +19,27 @@ from beemgraphenebase.objects import GrapheneObject, isArgsThisClass
...
@@ -19,27 +19,27 @@ from beemgraphenebase.objects import GrapheneObject, isArgsThisClass
from
.objecttypes
import
object_type
from
.objecttypes
import
object_type
from
beemgraphenebase.account
import
PublicKey
from
beemgraphenebase.account
import
PublicKey
from
beemgraphenebase.objects
import
Operation
as
GPHOperation
from
beemgraphenebase.objects
import
Operation
as
GPHOperation
from
beemgraphenebase.chains
import
known_chains
from
.operationids
import
operations
from
.operationids
import
operations
import
struct
import
struct
default_prefix
=
"
STM
"
default_prefix
=
"
STM
"
asset_precision
=
{
"
STEEM
"
:
3
,
"
VESTS
"
:
6
,
"
SBD
"
:
3
,
"
GBG
"
:
3
,
"
GOLOS
"
:
3
}
@python_2_unicode_compatible
@python_2_unicode_compatible
class
Amount
(
object
):
class
Amount
(
object
):
def
__init__
(
self
,
d
):
def
__init__
(
self
,
d
):
if
isinstance
(
d
,
string_types
):
if
isinstance
(
d
,
string_types
):
self
.
amount
,
self
.
asset
=
d
.
strip
().
split
(
"
"
)
self
.
amount
,
self
.
asset
=
d
.
strip
().
split
(
"
"
)
if
self
.
asset
in
asset_precision
:
self
.
precision
=
None
self
.
precision
=
asset_precision
[
self
.
asset
]
for
c
in
known_chains
:
else
:
if
self
.
precision
is
not
None
:
continue
for
asset
in
known_chains
[
c
][
"
chain_assets
"
]:
if
self
.
precision
is
not
None
:
continue
if
asset
[
"
symbol
"
]
==
self
.
asset
:
self
.
precision
=
asset
[
"
precision
"
]
if
self
.
precision
is
None
:
raise
Exception
(
"
Asset unknown
"
)
raise
Exception
(
"
Asset unknown
"
)
self
.
amount
=
int
(
float
(
self
.
amount
)
*
10
**
self
.
precision
)
self
.
amount
=
int
(
float
(
self
.
amount
)
*
10
**
self
.
precision
)
...
...
This diff is collapsed.
Click to expand it.
beemgraphenebase/objects.py
+
0
−
1
View file @
ff741940
...
@@ -15,7 +15,6 @@ from beemgraphenebase.types import (
...
@@ -15,7 +15,6 @@ from beemgraphenebase.types import (
Map
,
Id
,
JsonObj
Map
,
Id
,
JsonObj
)
)
from
.py23
import
py23_bytes
,
bytes_types
,
integer_types
,
string_types
from
.py23
import
py23_bytes
,
bytes_types
,
integer_types
,
string_types
from
.chains
import
known_chains
from
.objecttypes
import
object_type
from
.objecttypes
import
object_type
from
.operationids
import
operations
from
.operationids
import
operations
...
...
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