Skip to content

Commit

Permalink
Merge pull request #20 from sndmndss/dev
Browse files Browse the repository at this point in the history
1.2.2
  • Loading branch information
sndmndss authored Aug 28, 2024
2 parents fce4a23 + 7d4a304 commit 69b8647
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 28 deletions.
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

0 comments on commit 69b8647

Please sign in to comment.