Skip to content

Commit f952382

Browse files
authored
add address in select_bot (#82)
1 parent aa9ab0e commit f952382

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

client/base/asset_def.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,11 @@ func MakeBlindBoxScript(astList []*BoxAst) string {
7070
type SelBoxAstParam struct {
7171
AssetId int64
7272
ShardId int64
73+
Address string
7374
}
7475

7576
func (t *SelBoxAstParam) Valid() error {
76-
if t.AssetId < 1 || t.ShardId < 1 {
77+
if t.AssetId < 1 || t.ShardId < 1 || t.Address == "" {
7778
return ErrAssetInvalid
7879
}
7980
return nil

client/xasset/asset.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,6 +1089,7 @@ func (t *AssetOper) genSelBoxAstBody(param *xbase.SelBoxAstParam) (string, error
10891089
v := url.Values{}
10901090
v.Set("asset_id", fmt.Sprintf("%d", param.AssetId))
10911091
v.Set("shard_id", fmt.Sprintf("%d", param.ShardId))
1092+
v.Set("address", param.Address)
10921093
body := v.Encode()
10931094
return body, nil
10941095
}

0 commit comments

Comments
 (0)