-
Notifications
You must be signed in to change notification settings - Fork 7
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
Simulate submit clearer responces #62
Conversation
error?: Error, | ||
success?: { |
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.
here the type should be either error or success
{ error: Error } | { success: { .. } }
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.
Kinda annoying to refactor that out, so I'll add it as low priority issue
</div> | ||
<div class='flex gap-2 items-center'> | ||
<span class='w-16 text-right'>Gas Used</span> | ||
<span class='rounded bg-background px-2 py-1 font-mono font-medium'>{state.value.value.firstRevert.gasUsed} gas</span> | ||
<span class='bg-black px-2 py-1 font-mono font-medium'>{state.value.value.firstRevert.gasUsed} ETH</span> |
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.
is this unit correct?
<span class='rounded bg-background px-2 py-1 font-mono font-medium'> | ||
{'error' in state.value.value.firstRevert ? String(state.value.value.firstRevert.error) : 'Unknown'} | ||
</span> | ||
<span class='bg-black px-2 py-1 font-mono font-medium'>{'error' in state.value.value.firstRevert ? String(state.value.value.firstRevert.error) : 'Unknown'}</span> |
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.
can we get rid of casting to String?
</div>) | ||
if (outstandingBundles.value.error) return <SingleNotice variant='error' title='Error Sending Bundle' description={<p class='font-medium w-full break-all'>{outstandingBundles.value.error.message}</p>} /> | ||
|
||
const chainIdString = provider.value ? provider.value.chainId.toString(10) : '-1' |
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.
why are we assuming -1
as the string if we don't know? Shouldn't this be undefined, or "1" if we want to assume mainnet
export const BLOCK_EXPLORERS: { [chainId: string]: string } = { | ||
'1': 'https://etherscan.io/', | ||
'5': 'https://goerli.etherscan.io/' | ||
} |
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.
Can we also have Sepolia support?
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.
I don't believe we have a flashbots proxy for Sepolia.
Co-authored-by: KillariDev <[email protected]>
Resolves #44