-
Notifications
You must be signed in to change notification settings - Fork 433
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
Refactor: rm unnecessary tx decoding #4541
base: dev
Are you sure you want to change the base?
Conversation
Branch preview✅ Deploy successful! Website: Storybook: |
📦 Next.js Bundle Analysis for safe-wallet-webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! |
Coverage report
Show new covered files 🐣
Show files with reduced coverage 🔻
Test suite run success1618 tests passing in 217 suites. Report generated by 🧪jest coverage report action from 4ba74ef |
Counterfactual Safes cannot create transactions, so all good. |
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.
There is a unit-test failing because faker randomly generated an address that contains 420. We might want to choose a number thats more "random" to make that test more robust.
function SwapOrder({ txDetails, txInfo }: SwapOrderProps) { | ||
return ( | ||
<SwapOrderConfirmation | ||
order={txInfo as unknown as AnySwapOrderConfirmationView} | ||
settlementContract={txDetails?.txData?.to?.value ?? ''} | ||
/> | ||
) | ||
} |
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've checked the usage of SwapOrder
and we only use it in places where we have guards for checking txInfo
. Can't we type txInfo
here to be more narrow (i.e. Order
) instead of still resolving to TransactionInfo
? That way we wouldn't need to cast.
This would match the structure of StakingTxProps
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.
Good point, fixed.
Co-authored-by: Usame Algan <5880855+usame-algan@users.noreply.github.com>
What it solves
A follow-up on #4177 that partially addresses #4331.
How it solves it
How to test it
All the txs should work exactly as before.