Skip to content

Commit

Permalink
Fix Unmarshal error on ListDeposits API response (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
muzykantov committed Jun 17, 2022
1 parent 4d9b729 commit 7742592
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion v2/deposit_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ type Deposit struct {
TxID string `json:"txId"`
InsertTime int64 `json:"insertTime"`
TransferType int64 `json:"transferType"`
UnlockConfirm string `json:"unlockConfirm"`
UnlockConfirm int64 `json:"unlockConfirm"`
ConfirmTimes string `json:"confirmTimes"`
}

Expand Down
8 changes: 4 additions & 4 deletions v2/deposit_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (s *depositServiceTestSuite) TestListDeposits() {
"txId":"0xaad4654a3234aa6118af9b4b335f5ae81c360b2394721c019b5d1e75328b09f3",
"insertTime":1599621997000,
"transferType":0,
"unlockConfirm":"12/12",
"unlockConfirm":12,
"confirmTimes":"12/12"
},
{
Expand All @@ -39,7 +39,7 @@ func (s *depositServiceTestSuite) TestListDeposits() {
"txId":"ESBFVQUTPIWQNJSPXFNHNYHSQNTGKRVKPRABQWTAXCDWOAKDKYWPTVG9BGXNVNKTLEJGESAVXIKIZ9999",
"insertTime":1599620082000,
"transferType":0,
"unlockConfirm":"1/12",
"unlockConfirm":1,
"confirmTimes":"1/1"
}
]`)
Expand Down Expand Up @@ -79,7 +79,7 @@ func (s *depositServiceTestSuite) TestListDeposits() {
TxID: "0xaad4654a3234aa6118af9b4b335f5ae81c360b2394721c019b5d1e75328b09f3",
InsertTime: 1599621997000,
TransferType: 0,
UnlockConfirm: "12/12",
UnlockConfirm: 12,
ConfirmTimes: "12/12",
}, deposits[0])
s.assertDepositEqual(&Deposit{
Expand All @@ -92,7 +92,7 @@ func (s *depositServiceTestSuite) TestListDeposits() {
TxID: "ESBFVQUTPIWQNJSPXFNHNYHSQNTGKRVKPRABQWTAXCDWOAKDKYWPTVG9BGXNVNKTLEJGESAVXIKIZ9999",
InsertTime: 1599620082000,
TransferType: 0,
UnlockConfirm: "1/12",
UnlockConfirm: 1,
ConfirmTimes: "1/1",
}, deposits[1])
}
Expand Down

0 comments on commit 7742592

Please sign in to comment.