adds fees to add_rate_limited_funds

This commit is contained in:
Will Bendick 2020-09-28 15:43:28 -07:00 committed by Gene Hoffman
parent 4d2f3e2597
commit 8d50da67ec
3 changed files with 5 additions and 5 deletions

View File

@ -711,5 +711,5 @@ class WalletRpcApi:
)
request["wallet_id"] = 1
request["puzzle_hash"] = puzzle_hash
await wallet.rl_add_funds(request["amount"], puzzle_hash)
await wallet.rl_add_funds(request["amount"], puzzle_hash, request["fee"])
return {"status": "SUCCESS"}

View File

@ -761,9 +761,9 @@ class RLWallet:
return puzzle_hash
async def rl_add_funds(self, amount, puzzle_hash):
async def rl_add_funds(self, amount, puzzle_hash, fee):
spend_bundle = await self.main_wallet.generate_signed_transaction(
amount, puzzle_hash, uint64(0)
amount, puzzle_hash, fee
)
if spend_bundle is None:
return False

View File

@ -147,7 +147,7 @@ class TestRLWallet:
await time_out_assert(15, check_balance, 95, api_user, user_wallet_id)
await time_out_assert(15, receiving_wallet.get_spendable_balance, 3)
val = await api_admin.add_rate_limited_funds(
{"wallet_id": admin_wallet_id, "amount": 100}
{"wallet_id": admin_wallet_id, "amount": 100, "fee": 7}
)
assert val["status"] == "SUCCESS"
for i in range(0, 50):
@ -181,4 +181,4 @@ class TestRLWallet:
await time_out_assert(15, check_balance, 0, api_user, user_wallet_id)
await time_out_assert(15, check_balance, 0, api_admin, user_wallet_id)
final_balance = await wallet.get_confirmed_balance()
assert final_balance == fund_owners_initial_balance - 111
assert final_balance == fund_owners_initial_balance - 118