-
Notifications
You must be signed in to change notification settings - Fork 7
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
CU-86dtm13dg - Fix session changes listeners #121
Conversation
Task linked: CU-86dtm13dg Fix session changes listeners |
a043ca8
to
4b695c8
Compare
e2e/tests/DappMethods.spec.ts
Outdated
expect(hasSession).toBeTruthy() | ||
}) | ||
|
||
test.only('Create a new account and connect with a dapp (Svelte)', async ({ context }) => { |
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.
Using test.only
will skip all other tests when running the test suite. Ensure to remove it if all tests are intended to be executed.
context, | ||
dappPage, | ||
walletPage, | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars |
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.
The eslint-disable-next-line
directive is used to bypass the 'no-unused-vars' rule. Instead of disabling the rule, consider using the variables or refactoring the code to avoid unused parameters.
e2e/tests/DappMethods.spec.ts
Outdated
expect(hasSession).toBeFalsy() | ||
}, | ||
) | ||
const disconnectButton = await walletPage.awaitAndGetTestId('page__get-disconnect') // Get the dapp card element |
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.
The comment 'Get the dapp card element' seems misplaced as it does not match the variable disconnectButton
. Ensure the comment accurately describes the variable or remove it if it's not necessary.
@@ -41,15 +67,15 @@ | |||
'signTransaction', | |||
]) | |||
} catch (error) { | |||
alert(error.message) | |||
onError(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.
Ensure that the onError
function is defined and properly handles different types of errors. It should provide a user-friendly error message or logging mechanism, as replacing alert
with onError
changes how errors are communicated to the user.
} | ||
} | ||
|
||
const disconnect = async () => { | ||
try { | ||
await wcsdk.disconnect() | ||
} catch (error) { | ||
alert(error.message) | ||
onError(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.
Ensure that the onError
function is defined and properly handles different types of errors. It should provide a clear and user-friendly error message to the user, especially since it replaces a direct alert which was more straightforward.
@@ -41,15 +67,15 @@ | |||
'signTransaction', | |||
]) | |||
} catch (error) { | |||
alert(error.message) | |||
onError(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.
Ensure that the onError
function is defined and properly handles all types of errors that might be thrown by the wallet connection logic. It should also be verified that it gracefully handles the error without breaking the user experience.
} | ||
} | ||
|
||
const disconnect = async () => { | ||
try { | ||
await wcsdk.disconnect() | ||
} catch (error) { | ||
alert(error.message) | ||
onError(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.
Ensure that the onError
function is defined and properly handles different types of errors. This function should also manage user feedback appropriately, as simply replacing alert
with onError
might not maintain the same level of user interaction unless explicitly designed to do so.
f6d3663
to
56a9748
Compare
@@ -41,15 +67,15 @@ | |||
'signTransaction', | |||
]) | |||
} catch (error) { | |||
alert(error.message) | |||
onError(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.
Ensure that the onError
function is defined and properly handles errors. If it's a global handler, consider implementing more specific error handling logic relevant to this context.
} | ||
} | ||
|
||
const disconnect = async () => { | ||
try { | ||
await wcsdk.disconnect() | ||
} catch (error) { | ||
alert(error.message) | ||
onError(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.
Ensure that the onError
function is defined and properly handles different types of errors. It should provide a user-friendly error message and possibly log the error for debugging purposes.
6a37943
to
d6077cb
Compare
@@ -41,15 +67,15 @@ | |||
'signTransaction', | |||
]) | |||
} catch (error) { | |||
alert(error.message) | |||
onError(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.
Ensure that the onError
function is defined and imported in this file. If it's a global error handler, consider handling specific error types differently based on the context of this module.
} | ||
} | ||
|
||
const disconnect = async () => { | ||
try { | ||
await wcsdk.disconnect() | ||
} catch (error) { | ||
alert(error.message) | ||
onError(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.
Ensure that the onError
function is defined and imported in this file to handle errors properly. If it's a new function introduced by this change, verify its implementation to ensure it handles all possible error scenarios adequately.
d6077cb
to
1640ab4
Compare
@@ -41,15 +68,15 @@ | |||
'signTransaction', | |||
]) | |||
} catch (error) { | |||
alert(error.message) | |||
onError(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.
Ensure that the onError
function is defined and properly handles different types of errors. It should provide a clear and user-friendly error message, especially since it replaces a direct alert which was more straightforward.
} | ||
} | ||
|
||
const disconnect = async () => { | ||
try { | ||
await wcsdk.disconnect() | ||
} catch (error) { | ||
alert(error.message) | ||
onError(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.
Ensure that the onError
function is defined and properly handles different types of errors that might be thrown by wcsdk.disconnect()
. It should provide a user-friendly error handling mechanism, potentially logging the error or displaying a message in a more controlled manner than alert
. Also, consider the scope and reusability of onError
in other parts of your application.
100c35b
to
5903fc1
Compare
@@ -41,15 +68,15 @@ | |||
'signTransaction', | |||
]) | |||
} catch (error) { | |||
alert(error.message) | |||
onError(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.
Ensure that the onError
function is defined and properly handles different types of errors. It should provide a clear and user-friendly error message to the user, especially since it replaces a direct alert
which is straightforward.
} | ||
} | ||
|
||
const disconnect = async () => { | ||
try { | ||
await wcsdk.disconnect() | ||
} catch (error) { | ||
alert(error.message) | ||
onError(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.
Ensure that the onError
function is defined and properly handles different types of errors that may occur during the disconnect process. It should provide a user-friendly error handling mechanism, potentially logging the error or displaying a message to the user in a more controlled manner than alert
.
No description provided.