-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add backup logic to generate keys as part of the flow #320
Conversation
Signed-off-by: Nana-EC <nana@swirldslabs.com>
Kudos, SonarCloud Quality Gate passed!
|
Codecov Report
@@ Coverage Diff @@
## main #320 +/- ##
=======================================
Coverage 58.29% 58.29%
=======================================
Files 9 9
Lines 856 856
Branches 139 139
=======================================
Hits 499 499
Misses 325 325
Partials 32 32 Continue to review full report at Codecov.
|
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
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
|
||
const createAccountFromCompressedPublicKey = async function(compressedPublicKey) { | ||
const transferTransaction = await (new HederaSDK.TransferTransaction() | ||
.addHbarTransfer(HederaSDK.PublicKey.fromString(compressedPublicKey).toAccountId(0, 0), new HederaSDK.Hbar(100)) | ||
.addHbarTransfer(HederaSDK.AccountId.fromString(process.env.OPERATOR_ID_MAIN), new HederaSDK.Hbar(-100))) | ||
.addHbarTransfer(HederaSDK.PublicKey.fromString(compressedPublicKey).toAccountId(0, 0), new HederaSDK.Hbar(10)) |
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 decrease the initial balance from 100 to 10 HBARs?
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's expensive when running against remote envs.
HBAR is cheap on local-node
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.
Across all E2E tests we should try to keep test hbar costs as low as possible as we look to run these tests multiple times in remote envs
Signed-off-by: Nana-EC nana@swirldslabs.com
Description:
Add backup logic to generate keys as part of the flow
Related issue(s):
Fixes #319
Notes for reviewer:
Checklist