bug: update API unlocker format.
This commit is contained in:
@@ -165,7 +165,7 @@ class BaseMinerRPCAPI:
|
||||
for func in
|
||||
# each function in self
|
||||
dir(self)
|
||||
if not func == "commands"
|
||||
if not func in ["commands", "open_api"]
|
||||
if callable(getattr(self, func)) and
|
||||
# no __ or _ methods
|
||||
not func.startswith("__") and not func.startswith("_") and
|
||||
|
||||
@@ -349,7 +349,7 @@ class BTMinerRPCAPI(BaseMinerRPCAPI):
|
||||
stage1_req = (
|
||||
await c.post(
|
||||
"https://wmt.pyasic.org/v1/stage1",
|
||||
json={"ip": self.ip},
|
||||
json={"ip": str(self.ip)},
|
||||
follow_redirects=True,
|
||||
)
|
||||
).json()
|
||||
@@ -359,7 +359,10 @@ class BTMinerRPCAPI(BaseMinerRPCAPI):
|
||||
stage2_req = (
|
||||
await c.post(
|
||||
"https://wmt.pyasic.org/v1/stage2",
|
||||
json={"ip": self.ip, "stage1_result": stage1_res.decode("utf-8")},
|
||||
json={
|
||||
"ip": str(self.ip),
|
||||
"stage1_result": stage1_res.decode("utf-8"),
|
||||
},
|
||||
)
|
||||
).json()
|
||||
for command in stage2_req:
|
||||
|
||||
Reference in New Issue
Block a user