Skip to content
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

Integrate walletconnect #28

Closed
wants to merge 8 commits into from

Conversation

arhtudormorar
Copy link
Collaborator

@arhtudormorar arhtudormorar commented Oct 28, 2024

Feature

  • integrate walletconnect WIP

Additional changes

Contains breaking changes

[x] No

[] Yes

Updated CHANGELOG

[x] Yes

Testing

[x] User testing
[] Unit tests

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@property({ type: Boolean }) isOpen = false;
@property({ type: String }) qrCodeData = '';

static styles = css`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it mandatory to pe statically defined here? Do you think it could be better to extract in a separate file ?

onClientLogin: async function () {
closeModal();
const address = provider.getAddress();
console.log(`onClientLogin(), address: ${address}`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still need this log ?

console.log(`onClientLogin(), address: ${address}`);
},
onClientLogout: function () {
console.log('onClientLogout()');
Copy link
Contributor

@CiprianDraghici CiprianDraghici Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe// TODO instead of logs ?

const { uri, approval } = await provider.connect();

if (!uri) {
throw 'URI not found';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this throw will be caught outside, where the login function is called since the throw inside the catch will be caught in the catch block here, in the function...is it intended? Do you think is better to have a uniform way to handle the error exceptions?

const signature = account?.signature;

if (!account) {
throw new Error(`Connection Proposal Refused ${account}`);
Copy link
Contributor

@CiprianDraghici CiprianDraghici Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this throw will be caught at the line:80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants