Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.2.2 #20

Merged
merged 2 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions bpx/base/base_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ def get_deposit_address(

https://docs.backpack.exchange/#tag/Capital/operation/get_deposit_address
"""
if not Blockchain.has_value(blockchain):
raise InvalidBlockchainValue(blockchain)
params = {"blockchain": blockchain}
headers = self._headers(params, "depositAddressQuery", window=window)
url = self.BPX_API_URL + "wapi/v1/capital/deposit/address"
Expand Down Expand Up @@ -121,8 +119,6 @@ def withdrawal(

https://docs.backpack.exchange/#tag/Capital/operation/request_withdrawal
"""
if not Blockchain.has_value(blockchain):
raise InvalidBlockchainValue(blockchain)
params = {
"address": address,
"blockchain": blockchain,
Expand Down
10 changes: 0 additions & 10 deletions bpx/exceptions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@ def __init__(self, value):
super().__init__(f"Value {value} can't be negative")


class InvalidBlockchainValue(Exception):
"""Exception when blockchain value is invalid"""

def __init__(self, value):
super().__init__(
f"Blockchain value {value} is not supported\n"
f"https://docs.backpack.exchange/#tag/Capital/operation/get_deposits"
)


class InvalidTimeIntervalError(Exception):
def __init__(self, invalid_value):
self.invalid_value = invalid_value
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "bpx-py"
version = "1.2.1"
version = "1.2.2"
description = "Backpack API SDK tool"
authors = ["sndmndss <[email protected]>"]
readme = "README.md"
Expand Down
13 changes: 0 additions & 13 deletions tests/test_base_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from bpx.exceptions import (
NegativeValueError,
LimitValueError,
InvalidBlockchainValue,
)
import os

Expand Down Expand Up @@ -45,9 +44,6 @@ def test_get_deposits(account):


def test_get_deposit_address(account):
with pytest.raises(InvalidBlockchainValue):
account.get_deposit_address(blockchain="invalid_blockchain", window=10000)

request_config = account.get_deposit_address(
blockchain="Bitcoin", window=10000
)
Expand All @@ -63,15 +59,6 @@ def test_signing(account):


def test_withdrawal(account):
with pytest.raises(InvalidBlockchainValue):
account.withdrawal(
address="1BitcoinAddress",
symbol="BTC",
blockchain="invalid_blockchain",
quantity="1.0",
window=10000,
)

request_config = account.withdrawal(
address="1BitcoinAddress",
symbol="BTC",
Expand Down
Loading