Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: added missing fields in GetAllCoinsInfoService Network structure #604

Merged
merged 2 commits into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions v2/asset_detail_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ type Network struct {
WithdrawMax string `json:"withdrawMax"`
WithdrawMin string `json:"withdrawMin"`
SameAddress bool `json:"sameAddress"` // 是否需要memo
EstimatedArrivalTime int `json:"estimatedArrivalTime"`
Busy bool `json:"busy"`
ContractAddressUrl string `json:"contractAddressUrl"`
ContractAddress string `json:"contractAddress"`
}

// GetUserAssetService Get user assets
Expand Down
16 changes: 14 additions & 2 deletions v2/asset_detail_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ func (s *assetDetailServiceTestSuite) TestGetAllCoinsInfo() {
"withdrawIntegerMultiple": "0.00000001",
"withdrawMax": "9999999999.99999999",
"withdrawMin": "0.00000440",
"sameAddress": true
"sameAddress": true,
"estimatedArrivalTime": 25,
"busy": false,
"contractAddressUrl": "https://bscscan.com/token/",
"contractAddress": "0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c"
},
{
"addressRegex": "^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$|^(bc1)[0-9A-Za-z]{39,59}$",
Expand All @@ -96,7 +100,11 @@ func (s *assetDetailServiceTestSuite) TestGetAllCoinsInfo() {
"withdrawIntegerMultiple": "0.00000001",
"withdrawMax": "750",
"withdrawMin": "0.00100000",
"sameAddress": false
"sameAddress": false,
"estimatedArrivalTime": 25,
"busy": false,
"contractAddressUrl": "",
"contractAddress": ""
}
],
"storage": "0.00000000",
Expand All @@ -118,6 +126,10 @@ func (s *assetDetailServiceTestSuite) TestGetAllCoinsInfo() {
s.r().NoError(err)
s.r().Equal(res[0].DepositAllEnable, true, "depositAllEnable")
s.r().Equal(res[0].NetworkList[0].WithdrawEnable, false, "withdrawEnable")
s.r().Equal(res[0].NetworkList[0].EstimatedArrivalTime, 25, "estimatedArrivalTime")
s.r().Equal(res[0].NetworkList[0].Busy, false, "busy")
s.r().Equal(res[0].NetworkList[0].ContractAddressUrl, "https://bscscan.com/token/", "contractAddressUrl")
s.r().Equal(res[0].NetworkList[0].ContractAddress, "0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c", "contractAddress")
s.r().Equal(res[0].NetworkList[1].MinConfirm, 1, "minConfirm")
}

Expand Down
Loading