Skip to content

Commit adb5708

Browse files
committed
flake
1 parent 9fff0eb commit adb5708

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/wallet/trade_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@ async def maybe_create_wallets_for_offer(self, file_path: Path) -> bool:
193193

194194
return True
195195

196-
async def respond_to_offer(self, file_path: Path) -> bool:
196+
async def respond_to_offer(self, file_path: Path) -> Tuple[bool, Optional[str]]:
197197
has_wallets = await self.maybe_create_wallets_for_offer(file_path)
198198
if not has_wallets:
199-
return False
199+
return False, "Unknown Error"
200200
trade_offer_hex = file_path.read_text()
201201
trade_offer = SpendBundle.from_bytes(bytes.fromhex(trade_offer_hex))
202202

tests/cc_wallet/test_cc_wallet.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ async def test_cc_trade(self, two_wallet_nodes):
337337
assert offer["chia"] == -10
338338
assert offer[colour] == 30
339339

340-
success = await trade_manager_2.respond_to_offer(file_path)
340+
success, reason = await trade_manager_2.respond_to_offer(file_path)
341341

342342
assert success is True
343343

@@ -520,7 +520,7 @@ async def test_cc_trade_with_multiple_colours(self, two_wallet_nodes):
520520
assert offer[red] == 30
521521
assert offer[blue] == -50
522522

523-
success = await trade_manager_2.respond_to_offer(file_path)
523+
success, reason = await trade_manager_2.respond_to_offer(file_path)
524524

525525
assert success is True
526526
for i in range(0, num_blocks):
@@ -617,7 +617,7 @@ async def test_create_offer_with_zero_val(self, two_wallet_nodes):
617617
assert offer["chia"] == 10
618618
assert offer[colour] == -30
619619

620-
success = await trade_manager_1.respond_to_offer(file_path)
620+
success, reason = await trade_manager_1.respond_to_offer(file_path)
621621

622622
assert success is True
623623

0 commit comments

Comments
 (0)