OSDN Git Service
(root)
/
bytom
/
bytom-spv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb98440
)
add btm asset
author
oysheng
<oysheng@bytom.io>
Wed, 18 Apr 2018 12:56:57 +0000
(20:56 +0800)
committer
oysheng
<oysheng@bytom.io>
Wed, 18 Apr 2018 12:56:57 +0000
(20:56 +0800)
asset/asset.go
patch
|
blob
|
history
diff --git
a/asset/asset.go
b/asset/asset.go
index
7c3cf44
..
5528684
100644
(file)
--- a/
asset/asset.go
+++ b/
asset/asset.go
@@
-285,6
+285,11
@@
func (reg *Registry) GetAliasByID(id string) string {
// GetAsset get asset by assetID
func (reg *Registry) GetAsset(id string) (*Asset, error) {
asset := &Asset{}
+
+ if strings.Compare(id, DefaultNativeAsset.AssetID.String()) == 0 {
+ return DefaultNativeAsset, nil
+ }
+
if interAsset := reg.db.Get([]byte(assetPrefix + id)); interAsset != nil {
if err := json.Unmarshal(interAsset, asset); err != nil {
return nil, err