From ecd667db900516505e147e40aa9ee0eebf738cba Mon Sep 17 00:00:00 2001 From: thanhpp Date: Tue, 9 Apr 2024 23:33:39 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=A9=B9=20FlexibleProductPosition?= =?UTF-8?q?=20response?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: thanhpp --- v2/savings_service.go | 28 ++++++++++++++-------------- v2/savings_service_test.go | 10 +++++----- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/v2/savings_service.go b/v2/savings_service.go index 1849306a..46c2975f 100644 --- a/v2/savings_service.go +++ b/v2/savings_service.go @@ -483,20 +483,20 @@ type GetFlexibleProductPositionResponse struct { } type FlexibleProductPosition struct { - TotalAmount string `json:"totalAmount,omitempty"` - TierAnnualPercentageRate map[string]float64 `json:"tierAnnualPercentageRate,omitempty"` - LatestAnnualPercentageRate string `json:"latestAnnualPercentageRate,omitempty"` - YesterdayAirdropPercentageRate string `json:"yesterdayAirdropPercentageRate,omitempty"` - Asset string `json:"asset,omitempty"` - AirDropAsset string `json:"airDropAsset,omitempty"` - CanRedeem bool `json:"canRedeem,omitempty"` - CollateralAmount string `json:"collateralAmount,omitempty"` - ProductID string `json:"productId,omitempty"` - YesterdayRealTimeRewards string `json:"yesterdayRealTimeRewards,omitempty"` - CumulativeBonusRewards string `json:"cumulativeBonusRewards,omitempty"` - CumulativeRealTimeRewards string `json:"cumulativeRealTimeRewards,omitempty"` - CumulativeTotalRewards string `json:"cumulativeTotalRewards,omitempty"` - AutoSubscribe bool `json:"autoSubscribe,omitempty"` + TotalAmount string `json:"totalAmount,omitempty"` + TierAnnualPercentageRate map[string]string `json:"tierAnnualPercentageRate,omitempty"` + LatestAnnualPercentageRate string `json:"latestAnnualPercentageRate,omitempty"` + YesterdayAirdropPercentageRate string `json:"yesterdayAirdropPercentageRate,omitempty"` + Asset string `json:"asset,omitempty"` + AirDropAsset string `json:"airDropAsset,omitempty"` + CanRedeem bool `json:"canRedeem,omitempty"` + CollateralAmount string `json:"collateralAmount,omitempty"` + ProductID string `json:"productId,omitempty"` + YesterdayRealTimeRewards string `json:"yesterdayRealTimeRewards,omitempty"` + CumulativeBonusRewards string `json:"cumulativeBonusRewards,omitempty"` + CumulativeRealTimeRewards string `json:"cumulativeRealTimeRewards,omitempty"` + CumulativeTotalRewards string `json:"cumulativeTotalRewards,omitempty"` + AutoSubscribe bool `json:"autoSubscribe,omitempty"` } // https://binance-docs.github.io/apidocs/spot/en/#get-locked-product-position-user_data diff --git a/v2/savings_service_test.go b/v2/savings_service_test.go index 22e1eb95..bd41fb7b 100644 --- a/v2/savings_service_test.go +++ b/v2/savings_service_test.go @@ -403,8 +403,8 @@ func (s *savingsServiceTestSuite) TestGetFlexibleProductPositionService() { { "totalAmount": "75.46000000", "tierAnnualPercentageRate": { - "0-5BTC": 0.05, - "5-10BTC": 0.03 + "0-5BTC": "0.05", + "5-10BTC": "0.03" }, "latestAnnualPercentageRate": "0.02599895", "yesterdayAirdropPercentageRate": "0.02599895", @@ -438,9 +438,9 @@ func (s *savingsServiceTestSuite) TestGetFlexibleProductPositionService() { r.Len(positionsList.Rows, 1) s.assertFlexibleProductPosition(&FlexibleProductPosition{ TotalAmount: "75.46000000", - TierAnnualPercentageRate: map[string]float64{ - "0-5BTC": 0.05, - "5-10BTC": 0.03, + TierAnnualPercentageRate: map[string]string{ + "0-5BTC": "0.05", + "5-10BTC": "0.03", }, LatestAnnualPercentageRate: "0.02599895", YesterdayAirdropPercentageRate: "0.02599895",