Skip to content

Commit

Permalink
Fix return value of wallet_client from get_node_and_wallet_clients (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmmarslender authored Oct 16, 2023
1 parent cb89624 commit 9a99955
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ main.sym
/build/
/dist/
.idea/*
Configuration*.txt
*.sqlite
5 changes: 2 additions & 3 deletions cic/cli/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,9 @@ async def get_node_and_wallet_clients(
):
try:
full_node_client = await get_node_client(full_node_rpc_port)
_wallet_client = await get_wallet_client(wallet_rpc_port)
wallet_client_f = await get_wallet(_wallet_client, fingerprint)
wallet_client = await get_wallet_client(wallet_rpc_port)
wallet_client_f = await get_wallet(DEFAULT_ROOT_PATH, wallet_client, fingerprint)
assert wallet_client_f is not None
wallet_client, _ = wallet_client_f
return full_node_client, wallet_client
except Exception as e:
if isinstance(e, aiohttp.ClientConnectorError):
Expand Down
4 changes: 3 additions & 1 deletion cic/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,9 @@ def launch_cmd(
async def do_command():
node_client, wallet_client = await get_node_and_wallet_clients(node_rpc_port, wallet_rpc_port, fingerprint)
try:
fund_coins: List[Coin] = await wallet_client.select_coins(amount=(1 + fee), wallet_id=1)
fund_coins: List[Coin] = await wallet_client.select_coins(
amount=(1 + fee), wallet_id=1, max_coin_amount=uint64(2 ** 64 - 1)
)
fund_coin: Coin = fund_coins[0]
launcher_coin = Coin(fund_coin.name(), SINGLETON_LAUNCHER_HASH, 1)
new_derivation: RootDerivation = calculate_puzzle_root(
Expand Down
2 changes: 1 addition & 1 deletion tests/cli_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(self, sim_client):
self.sim_client = sim_client

# These are the only two methods we need
async def select_coins(self, amount, wallet_id) -> List[Coin]:
async def select_coins(self, amount, wallet_id, max_coin_amount=uint64(2 ** 64 - 1)) -> List[Coin]:
return [
sorted(
await self.sim_client.get_coin_records_by_puzzle_hashes([ACS_PH], include_spent_coins=False),
Expand Down

0 comments on commit 9a99955

Please sign in to comment.