-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: fetch withdrawals in parallel when possible #2147
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
const gateways = await getGateways(provider) | ||
const senderNonce = await backOff(() => getNonce(sender, { provider })) | ||
|
||
// sender queries; only add if nonce > 0 | ||
if (senderNonce > 0) { | ||
addQuery(buildQueryParams({ sender, gateways: [gateways.standardGateway] })) | ||
addQuery(buildQueryParams({ sender, gateways: [gateways.wethGateway] })) | ||
addQuery(buildQueryParams({ sender, gateways: [gateways.customGateway] })) | ||
addQuery(buildQueryParams({ sender, gateways: gateways.otherGateways })) | ||
} | ||
|
||
// receiver queries | ||
addQuery(buildQueryParams({ receiver, gateways: [gateways.standardGateway] })) | ||
addQuery(buildQueryParams({ receiver, gateways: [gateways.wethGateway] })) | ||
addQuery(buildQueryParams({ receiver, gateways: [gateways.customGateway] })) | ||
addQuery(buildQueryParams({ receiver, gateways: gateways.otherGateways })) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
baiscally, all this was moved to fetchWithdrawals
so you can have some more control from the outside
packages/arb-token-bridge-ui/src/util/withdrawals/fetchWithdrawals.ts
Outdated
Show resolved
Hide resolved
@@ -1,4 +1,4 @@ | |||
import { StaticJsonRpcProvider } from '@ethersproject/providers' | |||
import { Provider, StaticJsonRpcProvider } from '@ethersproject/providers' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused import
Summary
Steps to test