-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Nikos/5711/transaction with local wallet index should support to as a wallet index #5731
Nikos/5711/transaction with local wallet index should support to as a wallet index #5731
Conversation
…es" and add receiver error code as 437 This reverts commit 8e73e74.
packages/web3-eth/test/integration/web3_eth/send_transaction.test.ts
Outdated
Show resolved
Hide resolved
packages/web3-eth/test/integration/web3_eth/send_transaction.test.ts
Outdated
Show resolved
Hide resolved
packages/web3-types/src/eth_types.ts
Outdated
from?: Numbers; | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
to?: Address | Numbers | null; |
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.
to
being Address | null
is already handled by the type TransactionBase, so it should just be listed as Numbers
here. The problem is from
could be the local wallet index while to
is Address | null
, so I see why you did this, but it doesn't work for the inverse where to
is an index but from
is Address | null
I'm not sure how else to this besides introducing the following types: TransactionWithFromLocalWalletIndex
, TransactionWithToLocalWalletIndex
, and TransactionWithFromAndToLocalWalletIndex
, so definitely open to suggestions. I've opened #5748 to implement this (doesn't update the CHANGELOG
s, so that will need to be done if you decided to merge it)
…est.ts Co-authored-by: Wyatt Barnes <[email protected]>
…est.ts Co-authored-by: Wyatt Barnes <[email protected]>
#5748) * Init TransactionWithFromLocalWalletIndex, TransactionWithToLocalWalletIndex, TransactionWithToAndFromLocalWalletIndex types * Add null to Transaction.to * Rename TransactionWithToAndFromLocalWalletIndex to TransactionWithFromAndToLocalWalletIndex
Description
closes #5711
Checklist for 4.x:
yarn
successfullyyarn lint
successfullyyarn build:web
successfullyyarn test:unit
successfullyyarn test:integration
successfullycompile:contracts
successfullyCHANGELOG.md
file in the packages I have edited.