OSDN Git Service

update (#423)
authorChengcheng Zhang <943420582@qq.com>
Thu, 24 Oct 2019 03:05:16 +0000 (11:05 +0800)
committerPaladz <yzhu101@uottawa.ca>
Thu, 24 Oct 2019 03:05:16 +0000 (11:05 +0800)
asset/asset.go
database/wallet_store.go

index 12ae60b..9574d79 100644 (file)
@@ -224,7 +224,7 @@ func (reg *Registry) GetAsset(id string) (*Asset, error) {
                if err := json.Unmarshal(extAsset, &definitionMap); err != nil {
                        return nil, err
                }
-               alias := assetID.String()
+               alias := strings.ToUpper(assetID.String())
                asset.Alias = &alias
                asset.AssetID = assetID
                asset.DefinitionMap = definitionMap
index c0bf9f9..ded9cfd 100644 (file)
@@ -5,6 +5,7 @@ import (
        "encoding/hex"
        "encoding/json"
        "fmt"
+       "strings"
 
        log "github.com/sirupsen/logrus"
 
@@ -227,7 +228,7 @@ func (store *WalletStore) GetAsset(assetID *bc.AssetID) (*asset.Asset, error) {
                return nil, err
        }
 
-       alias := assetID.String()
+       alias := strings.ToUpper(assetID.String())
        externalAsset := &asset.Asset{
                AssetID:           *assetID,
                Alias:             &alias,