hashgraph / hedera-wallet-connect

This package is a messaging relay between decentralized applications and wallets in Hedera network based on Wallet Connect relays.
Apache License 2.0
13 stars 22 forks source link

v1.3.6 Improved Session Handling and Logging #324

Closed kantorcodes closed 3 weeks ago

kantorcodes commented 3 weeks ago

Description:

This PR suggests a number of fixes to improve the dApp experience:

  1. Enables dApps to specify a log level for better control of console logs.
  2. Ensures that there is only one Signer per AccountId + ExtensionId combination. Having multiple signers with different ids created issues in pulling the correct record.
  3. Explores better state management and automatic removal of stale sessions.

Related issue(s):

Fixes CON-494

Notes for reviewer:

Checklist

github-actions[bot] commented 3 weeks ago

Coverage report

St.:grey_question:
Category Percentage Covered / Total
πŸ”΄ Statements
35.27% (-3.33% πŸ”»)
225/638
πŸ”΄ Branches
25% (-3.3% πŸ”»)
31/124
πŸ”΄ Functions
23.49% (-2.07% πŸ”»)
35/149
πŸ”΄ Lines
36.13% (-3.56% πŸ”»)
211/584
Show new covered files 🐣
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :-: | :- | :- | :- | :- | :- | | πŸ”΄ |
`...` / logger.ts
| 25% | 0% | 16.67% | 25% |
Show files with reduced coverage πŸ”»
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :-: | :- | :- | :- | :- | :- | | πŸ”΄ |
`...` / index.ts
|
15.53% (-4.33% πŸ”»)
|
17.5% (-4.72% πŸ”»)
|
6.25% (-1.44% πŸ”»)
|
16.84% (-4.74% πŸ”»)
| | πŸ”΄ |
`...` / DAppSigner.ts
|
44.71% (-0.53% πŸ”»)
| 26.09% |
36% (-1.5% πŸ”»)
|
44.44% (-1.13% πŸ”»)
|

Test suite run success

25 tests passing in 2 suites.

Report generated by πŸ§ͺjest coverage report action from 9b42a86a64bc36de010f23f44c2fddbbe44abb5d

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 6.97674% with 40 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@b3600fd). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/lib/dapp/index.ts 8.33% 30 Missing and 3 partials :warning:
src/lib/dapp/DAppSigner.ts 0.00% 3 Missing and 1 partial :warning:
src/lib/shared/utils.ts 0.00% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #324 +/- ## ======================================= Coverage ? 36.05% ======================================= Files ? 14 Lines ? 613 Branches ? 80 ======================================= Hits ? 221 Misses ? 372 Partials ? 20 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.