black formatting

This commit is contained in:
Matthew Howard 2020-04-23 20:26:01 +01:00
parent 16c243631e
commit 840f4eb101
4 changed files with 15 additions and 10 deletions

View File

@ -119,7 +119,7 @@ def cc_generate_eve_spend(coin: Coin, full_puzzle: Program):
solution = cc_make_eve_solution(
coin.parent_coin_info, coin.puzzle_hash, coin.amount
)
list_of_solutions = [CoinSolution(coin, clvm.to_sexp_f([full_puzzle, solution, ]), )]
list_of_solutions = [CoinSolution(coin, clvm.to_sexp_f([full_puzzle, solution,]),)]
aggsig = BLSSignature.aggregate([])
spend_bundle = SpendBundle(list_of_solutions, aggsig)
return spend_bundle

View File

@ -369,7 +369,9 @@ class TradeManager:
# Finish the auditor CoinSolution with new information
newinnerpuzhash = await wallets[colour].get_new_inner_hash()
outputamount = (
sum([c.amount for c in my_cc_spends]) + cc_discrepancies[colour] + auditor.amount
sum([c.amount for c in my_cc_spends])
+ cc_discrepancies[colour]
+ auditor.amount
)
innersol = self.wallet_state_manager.main_wallet.make_solution(
primaries=[{"puzzlehash": newinnerpuzhash, "amount": outputamount}]

View File

@ -425,7 +425,12 @@ class WebSocketServer:
if type == WalletType.COLOURED_COIN:
name = wallet.cc_info.my_colour_name
colour = await wallet.get_colour()
response[wallet_id] = {"type": type, "balance": balance, "name": name, "colour": colour}
response[wallet_id] = {
"type": type,
"balance": balance,
"name": name,
"colour": colour,
}
else:
response[wallet_id] = {"type": type, "balance": balance}
return await websocket.send(format_response(response_api, response))

View File

@ -336,9 +336,7 @@ class TestWalletSimulator:
file_path.unlink()
offer_dict = {1: 10, 2: -30}
success, spend_bundle = await trade_manager_1.create_offer_for_ids(
offer_dict
)
success, spend_bundle = await trade_manager_1.create_offer_for_ids(offer_dict)
assert success is True
assert spend_bundle is not None
@ -432,7 +430,9 @@ class TestWalletSimulator:
for i in range(1, num_blocks):
await full_node_1.farm_new_block(FarmNewBlockProtocol(ph))
blue_wallet: CCWallet = await CCWallet.create_wallet_for_cc(wallet_node.wallet_state_manager, wallet, blue)
blue_wallet: CCWallet = await CCWallet.create_wallet_for_cc(
wallet_node.wallet_state_manager, wallet, blue
)
assert blue_wallet.cc_info.my_core == blue_wallet_2.cc_info.my_core
@ -451,9 +451,7 @@ class TestWalletSimulator:
offer_dict = {1: -1000, 2: -30, 3: 50}
success, spend_bundle = await trade_manager_1.create_offer_for_ids(
offer_dict
)
success, spend_bundle = await trade_manager_1.create_offer_for_ids(offer_dict)
assert success is True
assert spend_bundle is not None