Skip to content

Commit

Permalink
patch invoke contract str arg bug
Browse files Browse the repository at this point in the history
  • Loading branch information
John-peterson-coinbase committed Nov 7, 2024
1 parent d599a6a commit 5c40f96
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

- Adds `source` and `source_version` to correlation header for better observability.

### Fixed

- Fix bug in `WalletAddress` `invoke_contract` that failed to properly handle `amount` with type `str`

## [0.10.2] - 2024-11-06

### Added
Expand Down
2 changes: 1 addition & 1 deletion cdp/wallet_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def invoke_contract(
normalized_amount = Decimal(amount) if amount else Decimal("0")

if amount and asset_id:
self._ensure_sufficient_balance(amount, asset_id)
self._ensure_sufficient_balance(normalized_amount, asset_id)

invocation = ContractInvocation.create(
address_id=self.address_id,
Expand Down

0 comments on commit 5c40f96

Please sign in to comment.