-
Notifications
You must be signed in to change notification settings - Fork 455
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
Fix: show relays even when 0 relays left #2789
Conversation
Branch preview✅ Deploy successful! https://--walletweb.review-wallet-web.5afe.dev |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
{relays && !relays.remaining && ( | ||
<Box component="span" sx={{ color: 'error.main' }}> | ||
{' '} | ||
— will reset in the next hour | ||
</Box> |
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 think this is slightly redundant since the label already says "Transactions per hour". Maybe we could instead make the "0 of 5" a red color?
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 added this based on Liliya's feedback. It might be redundant, but it's definitely clearer. IMO we should err on the safe side.
Coverage report
Show files with reduced coverage 🔻
Test suite run success1105 tests passing in 155 suites. Report generated by 🧪jest coverage report action from 93e9e88 |
@@ -57,11 +56,10 @@ const ExecuteForm = ({ | |||
const [executionMethod, setExecutionMethod] = useState(ExecutionMethod.RELAY) | |||
|
|||
// SC wallets can relay fully signed transactions | |||
const [walletCanRelay] = useWalletCanRelay(safeTx) | |||
|
|||
const [canRelay] = useWalletCanRelay(safeTx) |
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 think this naming is more confusing now since its not about if the user can relay but if their wallet supports relaying.
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.
Renamed it to canWalletRelay
.
I noticed that now executing with the connected wallet is the default option, it used to be the relayer. Is this an intentional change? Beyond this the PR looks good to me |
What it solves
The relay function disappearing when there are 0 relays is not intutive. It's better to show that the quota is over and that it will reset in an hour.
Plus, I've added a warning that the connected wallet should have enough funds (steps on the toes of #2678, but it's just a quick fix until that PR is merged).
Relay:
Wallet: