-
Notifications
You must be signed in to change notification settings - Fork 294
chore: parallellize keychain and queryPromise #6136
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
base: master
Are you sure you want to change the base?
Conversation
e0befb2
to
7baae82
Compare
8ecb7ea
to
bbb3faa
Compare
c682e7c
to
2ba5ea3
Compare
87c70b9
to
c829563
Compare
4bd8ccb
to
037ee71
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.
LGTM
} | ||
try { | ||
await ethWallet.sendMany({ ...sendManyParamsCorrectPassPhrase }); | ||
} catch (e) { | ||
e.message.should.not.equal(errorMessage); | ||
e.message.should.equal(errorMessage); |
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 did we change this test?
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.
After making validation and prebuildQuery parallel, it would give a consistent error message unable to decrypt keychain with the given wallet passphrase
. This test explicitly checked for error message to be different
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.
if the error message changes it might break client's code - I don't think we should merge this until we can fix this
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.
please revert tests change
cd404c2
cd6d3e3
to
a8c3591
Compare
[keychains, txPrebuild] = (await Promise.all([keychainPromise, txPrebuildQuery])) as [ | ||
Keychain[], | ||
PrebuildTransactionResult | ||
]; |
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.
[keychains, txPrebuild] = (await Promise.all([keychainPromise, txPrebuildQuery])) as [ | |
Keychain[], | |
PrebuildTransactionResult | |
]; | |
[keychains, txPrebuild] = (await Promise.allSettled([keychainPromise, txPrebuildQuery])) as [ | |
Keychain[], | |
PrebuildTransactionResult | |
]; |
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 more suitable. With this API you can handle errors for a specific promise instead of guessing based on your caught error.
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.
sure will update it now thanks
Ticket: CAAS-7
d23b489
to
6a78c59
Compare
Ticket: CAAS-7
prebuildAndSignTransaction
function to improve/sendcoins
endpoint performance