Skip to content

Commit

Permalink
Fix retry wallet address check
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangruber committed Nov 17, 2023
1 parent dab6918 commit a68b55f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions commands/station.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ export const station = async ({ json, experimental }) => {
) {
panic('FIL_WALLET_ADDRESS must start with f410 or 0x')
}
const fetchRes = await fetch(
`https://station-wallet-screening.fly.dev/${FIL_WALLET_ADDRESS}`
const fetchRes = await pRetry(
() => fetch(`https://station-wallet-screening.fly.dev/${FIL_WALLET_ADDRESS}`),
{
retries: 1000,
onFailedAttempt: () =>
console.error('Failed to check FIL_WALLET_ADDRESS address. Retrying...')
}
)
if (fetchRes.status === 403) panic('Invalid FIL_WALLET_ADDRESS address')
if (!fetchRes.ok) panic('Failed to check FIL_WALLET_ADDRESS address')
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@sentry/node": "^7.41.0",
"execa": "^8.0.1",
"gunzip-maybe": "^1.4.2",
"p-retry": "^6.0.0",
"p-retry": "^6.1.0",
"tar-fs": "^3.0.3",
"undici": "^5.20.0",
"unzip-stream": "^0.3.1",
Expand Down

0 comments on commit a68b55f

Please sign in to comment.