-
Notifications
You must be signed in to change notification settings - Fork 230
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
Multisend fix #106
Multisend fix #106
Conversation
CLA Assistant Lite All Contributors have signed the CLA. |
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.
Looking good, just one small thing
packages/safe-core-sdk/src/Safe.ts
Outdated
): Promise<SafeTransaction> { | ||
if (safeTransactions instanceof Array) { | ||
const isTxArray = Array.isArray(safeTransactions) | ||
if (isTxArray && (safeTransactions as MetaTransactionData[]).length === 0) { |
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.
Will this always be MetaTransactionsData[]
?
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.
As well as the other casts you make in this function?
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.
You could also just cast it once under a new variable, no?
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.
It can be MetaTransactionsData[]
or SafeTransactionDataPartial
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.
Maybe make a type checking function that returns value is X
?
c97a7ca
to
e818a31
Compare
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.
🚀
c867c1b
to
e818a31
Compare
What it solves
Resolves #101
How this PR fixes it