Skip to content

Commit d2b44ab

Browse files
authored
fix: added missing fields in GetAllCoinsInfoService Network structure (#604)
* fix: added missing fields in GetAllCoinsInfoService Network section * fix: returned accidentally removed line
1 parent 6189b9c commit d2b44ab

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

v2/asset_detail_service.go

+4
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ type Network struct {
111111
WithdrawMax string `json:"withdrawMax"`
112112
WithdrawMin string `json:"withdrawMin"`
113113
SameAddress bool `json:"sameAddress"` // 是否需要memo
114+
EstimatedArrivalTime int `json:"estimatedArrivalTime"`
115+
Busy bool `json:"busy"`
116+
ContractAddressUrl string `json:"contractAddressUrl"`
117+
ContractAddress string `json:"contractAddress"`
114118
}
115119

116120
// GetUserAssetService Get user assets

v2/asset_detail_service_test.go

+14-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ func (s *assetDetailServiceTestSuite) TestGetAllCoinsInfo() {
7777
"withdrawIntegerMultiple": "0.00000001",
7878
"withdrawMax": "9999999999.99999999",
7979
"withdrawMin": "0.00000440",
80-
"sameAddress": true
80+
"sameAddress": true,
81+
"estimatedArrivalTime": 25,
82+
"busy": false,
83+
"contractAddressUrl": "https://bscscan.com/token/",
84+
"contractAddress": "0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c"
8185
},
8286
{
8387
"addressRegex": "^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$|^(bc1)[0-9A-Za-z]{39,59}$",
@@ -96,7 +100,11 @@ func (s *assetDetailServiceTestSuite) TestGetAllCoinsInfo() {
96100
"withdrawIntegerMultiple": "0.00000001",
97101
"withdrawMax": "750",
98102
"withdrawMin": "0.00100000",
99-
"sameAddress": false
103+
"sameAddress": false,
104+
"estimatedArrivalTime": 25,
105+
"busy": false,
106+
"contractAddressUrl": "",
107+
"contractAddress": ""
100108
}
101109
],
102110
"storage": "0.00000000",
@@ -118,6 +126,10 @@ func (s *assetDetailServiceTestSuite) TestGetAllCoinsInfo() {
118126
s.r().NoError(err)
119127
s.r().Equal(res[0].DepositAllEnable, true, "depositAllEnable")
120128
s.r().Equal(res[0].NetworkList[0].WithdrawEnable, false, "withdrawEnable")
129+
s.r().Equal(res[0].NetworkList[0].EstimatedArrivalTime, 25, "estimatedArrivalTime")
130+
s.r().Equal(res[0].NetworkList[0].Busy, false, "busy")
131+
s.r().Equal(res[0].NetworkList[0].ContractAddressUrl, "https://bscscan.com/token/", "contractAddressUrl")
132+
s.r().Equal(res[0].NetworkList[0].ContractAddress, "0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c", "contractAddress")
121133
s.r().Equal(res[0].NetworkList[1].MinConfirm, 1, "minConfirm")
122134
}
123135

0 commit comments

Comments
 (0)