From 0b7522dbebf13eb2211ce93c9137a732fc74da2d Mon Sep 17 00:00:00 2001 From: urischwartz-cb <143205923+urischwartz-cb@users.noreply.github.com> Date: Mon, 29 Jan 2024 12:14:37 -0500 Subject: [PATCH] v1.0.4 (#20) --- CHANGELOG.md | 5 +++++ coinbase/__version__.py | 2 +- coinbase/rest/portfolios.py | 6 +++--- tests/rest/test_portfolios.py | 9 +++++---- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7dce74..13d9820 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## [1.0.4] - 2024-JAN-29 + +### Fixed +- Fixed bug where `move_portfolio_funds` params were set incorrectly + ## [1.0.3] - 2024-JAN-19 ### Changed diff --git a/coinbase/__version__.py b/coinbase/__version__.py index 976498a..92192ee 100644 --- a/coinbase/__version__.py +++ b/coinbase/__version__.py @@ -1 +1 @@ -__version__ = "1.0.3" +__version__ = "1.0.4" diff --git a/coinbase/rest/portfolios.py b/coinbase/rest/portfolios.py index c75925d..c3135b1 100644 --- a/coinbase/rest/portfolios.py +++ b/coinbase/rest/portfolios.py @@ -59,11 +59,11 @@ def move_portfolio_funds( data = { "funds": { - "amount": value, + "value": value, "currency": currency, }, - "source_portfolio_id": source_portfolio_uuid, - "target_portfolio_id": target_portfolio_uuid, + "source_portfolio_uuid": source_portfolio_uuid, + "target_portfolio_uuid": target_portfolio_uuid, } return self.post(endpoint, data=data, **kwargs) diff --git a/tests/rest/test_portfolios.py b/tests/rest/test_portfolios.py index b18a934..d960735 100644 --- a/tests/rest/test_portfolios.py +++ b/tests/rest/test_portfolios.py @@ -3,7 +3,8 @@ from requests_mock import Mocker from coinbase.rest import RESTClient -from tests.constants import TEST_API_KEY, TEST_API_SECRET + +from ..constants import TEST_API_KEY, TEST_API_SECRET class PortfoliosTest(unittest.TestCase): @@ -83,9 +84,9 @@ def test_move_portfolio_funds(self): self.assertEqual( captured_json, { - "funds": {"amount": "100", "currency": "USD"}, - "source_portfolio_id": "1234", - "target_portfolio_id": "5678", + "funds": {"value": "100", "currency": "USD"}, + "source_portfolio_uuid": "1234", + "target_portfolio_uuid": "5678", }, ) self.assertEqual(move, expected_response)