Skip to content

Commit

Permalink
v1.0.4 (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
urischwartz-cb authored Jan 29, 2024
1 parent 681ab17 commit 0b7522d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion coinbase/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.3"
__version__ = "1.0.4"
6 changes: 3 additions & 3 deletions coinbase/rest/portfolios.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 5 additions & 4 deletions tests/rest/test_portfolios.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 0b7522d

Please sign in to comment.