From 25a3b7039728b965d15059923def95aa101ea970 Mon Sep 17 00:00:00 2001 From: banteg Date: Thu, 11 Nov 2021 23:00:34 +0300 Subject: [PATCH] fix: edge case with empty data transactions --- .gitignore | 2 ++ ape_safe.py | 2 +- pyproject.toml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ede3a45..f0f3b8f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ dist/ _build/ poetry.lock .hypothesis/ +cache/ +build/ diff --git a/ape_safe.py b/ape_safe.py index 7913210..3d39a28 100644 --- a/ape_safe.py +++ b/ape_safe.py @@ -205,7 +205,7 @@ def pending_transactions(self) -> List[SafeTx]: self.build_multisig_tx( to=tx['to'], value=int(tx['value']), - data=HexBytes(tx['data']), + data=HexBytes(tx['data'] or b''), operation=tx['operation'], safe_tx_gas=tx['safeTxGas'], base_gas=tx['baseGas'], diff --git a/pyproject.toml b/pyproject.toml index d775b28..a0294fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "ape-safe" -version = "0.3.0" +version = "0.3.2" description = "Build complex Gnosis Safe transactions and safely preview them in a forked environment." authors = ["banteg "] license = "MIT"