-
Notifications
You must be signed in to change notification settings - Fork 204
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
feat: only connect to ledger when needed #273
feat: only connect to ledger when needed #273
Conversation
Codecov Report
@@ Coverage Diff @@
## main #273 +/- ##
=======================================
Coverage 88.75% 88.76%
=======================================
Files 215 216 +1
Lines 3878 3897 +19
Branches 436 438 +2
=======================================
+ Hits 3442 3459 +17
- Misses 436 438 +2
Continue to review full report at Codecov.
|
2803bfb
to
5ff017c
Compare
Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: Timo Glastra <[email protected]>
5ff017c
to
52c2bd4
Compare
There is this mention "if not open it and then close it after not being used for e.g. two minutes" in #265. Is it also implemented in this PR? Are we able to somehow detect that the connection to the ledger has been lost? |
@@ -16,10 +16,6 @@ export class LedgerModule { | |||
this.wallet = wallet | |||
} | |||
|
|||
public async connect(poolName: string, poolConfig: LedgerConnectOptions) { | |||
return this.ledgerService.connect(poolName, poolConfig) | |||
} |
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.
Can we make this one also public?
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.
oops forgot about that one
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.
We should just make the connect
method in the module public. My other comment is not a blocker for this PR.
No that's not implemented as part of this PR, I wanted to address that in a separate PR. Next step is allowing to close the pool and reconnect. But to keep PRs smaller I'm taking baby steps :) |
That's good 👍 of course.. I just wanted to mention it because the issue is closed by this PR now, but it could be good to have some opened for this work ;) |
I created a new issue #277. Could you make the CI jobs required for merge? That's easier with auto-merge. I don't have the permission to do so |
genesisTransactions
so you don't have to deal with storing the genesis yourselfFixes #219
Fixes #265
The ledger management can be improved, but I think this is a simple first step. Only open the ledger connection if a ledger call is made
Tested in both NodeJS and React Native