Skip to content

Commit

Permalink
removes duplicate code
Browse files Browse the repository at this point in the history
  • Loading branch information
wbendick authored and hoffmang9 committed Aug 18, 2020
1 parent 6351f7c commit 856b732
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/rpc/wallet_rpc_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ def get_routes(self) -> Dict[str, Callable]:
"/get_height_info": self.get_height_info,
"/create_new_wallet": self.create_new_wallet,
"/get_wallets": self.get_wallets,
"/rl_set_admin_info": self.rl_set_admin_info,
"/rl_set_user_info": self.rl_set_user_info,
"/cc_set_name": self.cc_set_name,
"/cc_get_name": self.cc_get_name,
"/cc_spend": self.cc_spend,
Expand Down Expand Up @@ -386,34 +384,6 @@ async def get_wallets(self, request: Dict):

return response

async def rl_set_admin_info(self, request):
wallet_id = int(request["wallet_id"])
wallet: RLWallet = self.service.wallet_state_manager.wallets[wallet_id]
user_pubkey = request["user_pubkey"]
limit = uint64(int(request["limit"]))
interval = uint64(int(request["interval"]))
amount = uint64(int(request["amount"]))

success = await wallet.admin_create_coin(interval, limit, user_pubkey, amount)

response = {"success": success}

return response

async def rl_set_user_info(self, request):
wallet_id = int(request["wallet_id"])
wallet: RLWallet = self.service.wallet_state_manager.wallets[wallet_id]
admin_pubkey = request["admin_pubkey"]
limit = uint64(int(request["limit"]))
interval = uint64(int(request["interval"]))
origin_id = request["origin_id"]

success = await wallet.set_user_info(interval, limit, origin_id, admin_pubkey)

response = {"success": success}

return response

async def cc_set_name(self, request):
wallet_id = int(request["wallet_id"])
wallet: CCWallet = self.service.wallet_state_manager.wallets[wallet_id]
Expand Down

0 comments on commit 856b732

Please sign in to comment.