Skip to content

Commit e328ca1

Browse files
authored
Adding uid into the account service response (#587)
* Adding uid into the account service response * Update account_service_test.go * Update account_service_test.go * test: get account
1 parent 81cc831 commit e328ca1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

v2/account_service.go

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ type Account struct {
4343
AccountType string `json:"accountType"`
4444
Balances []Balance `json:"balances"`
4545
Permissions []string `json:"permissions"`
46+
UID int64 `json:"uid"`
4647
}
4748

4849
// Balance define user balance of your account

v2/account_service_test.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ func (s *accountServiceTestSuite) TestGetAccount() {
4545
],
4646
"permissions": [
4747
"SPOT"
48-
]
48+
],
49+
"uid": 354937868
4950
}`)
5051
s.mockDo(data, nil)
5152
defer s.assertDo()
@@ -85,6 +86,7 @@ func (s *accountServiceTestSuite) TestGetAccount() {
8586
},
8687
},
8788
Permissions: []string{"SPOT"},
89+
UID: 354937868,
8890
}
8991
s.assertAccountEqual(e, res)
9092
}
@@ -108,6 +110,7 @@ func (s *accountServiceTestSuite) assertAccountEqual(e, a *Account) {
108110
r.Equal(e.Balances[i].Free, a.Balances[i].Free, "Free")
109111
r.Equal(e.Balances[i].Locked, a.Balances[i].Locked, "Locked")
110112
}
113+
r.Equal(e.UID, a.UID, "UID")
111114
}
112115

113116
func (s *accountServiceTestSuite) TestGetAccountSnapshot() {

0 commit comments

Comments
 (0)