MCPcopy Create free account
hub / github.com/Toulu-debug/enen / getshareCodeHW

Function getshareCodeHW

TS_USER_AGENTS.ts:178–193  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

176}
177
178async function getshareCodeHW(key: string) {
179 let shareCodeHW: string[] = []
180 for (let i = 0; i < 5; i++) {
181 try {
182 let {data}: any = await axios.get('http://sharecodepool.cnmb.pw/api/HW_CODES')
183 shareCodeHW = data[key] || []
184 if (shareCodeHW.length !== 0) {
185 break
186 }
187 } catch (e) {
188 console.log("getshareCodeHW Error, Retry...")
189 await wait(getRandomNumberByRange(2000, 6000))
190 }
191 }
192 return shareCodeHW
193}
194
195async function getShareCodePool(key: string, num: number) {
196 let shareCode: string[] = []

Callers

nothing calls this directly

Calls 4

waitFunction · 0.85
getRandomNumberByRangeFunction · 0.85
getMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected