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

sdk update #497

Merged
merged 4 commits into from Feb 14, 2024
Merged

sdk update #497

merged 4 commits into from Feb 14, 2024

Conversation

bogdan-manole
Copy link
Collaborator

@bogdan-manole bogdan-manole commented May 9, 2023

fixes #357

temp todo list:

  • browser wallet connection
  • mobile wallet connection
  • on user rejection or when first wallet connect there is a general error

@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2023

Deployed to https://pr-497-dex-ui.stg.aepps.com

@bogdan-manole bogdan-manole force-pushed the chore/sdk-13 branch 2 times, most recently from c3a2d2c to 5da6e07 Compare May 14, 2023 20:54
@bogdan-manole bogdan-manole marked this pull request as ready for review September 7, 2023 07:39
Copy link

@thepiwo thepiwo left a comment

Choose a reason for hiding this comment

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

what is still needed here?

import contractInfo from 'dex-contracts-v2/package.json';
// TODO: i don't think this is ok
Copy link

Choose a reason for hiding this comment

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

why shouldn't it be?

Copy link
Member

Choose a reason for hiding this comment

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

I think because package-lock is 1.52 MB. I'm not sure about the best practice here.

Should I add "package.json" to "exports" field of aepp-sdk? Or to export sdk version as a constant? I think the best would be to have a solution that works the same for any npm dependency.

As a workaround, you can import the local package.json but there would be a lower-bound version of the installed sdk.

On the other side, you don't need the whole package.json, just a single field of it, maybe you can retrive it in vue.config.js and copy it to a global definition? Then there would be no extra data in the bundle.

definitions['process.env.UNFINISHED_FEATURES'] = parseBool(process.env.VUE_APP_UNFINISHED_FEATURES);

Copy link

Choose a reason for hiding this comment

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

Yes, but using the package.json should be fine

src/components/AeBalance.vue Outdated Show resolved Hide resolved
src/store/index.js Outdated Show resolved Hide resolved
src/store/index.js Outdated Show resolved Hide resolved
src/lib/utils.js Outdated Show resolved Hide resolved
src/lib/utils.js Outdated Show resolved Hide resolved
Comment on lines 87 to 81
this.nodeVersion = (await this.sdk.getNodesInPool()).find((node) => node.name
=== this.sdk.selectedNodeName)?.version || '-';
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
this.nodeVersion = (await this.sdk.getNodesInPool()).find((node) => node.name
=== this.sdk.selectedNodeName)?.version || '-';
try {
this.nodeVersion = await this.sdk.api.getNetworkId();
} catch (e) {
this.nodeVersion = '-';
}

Or maybe you don't need try/catch if you have some node by default.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

but this is about the node version, not the networkId

Copy link
Member

Choose a reason for hiding this comment

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

my bad, proposing to use getNodeInfo instead of getting node info of all nodes

Suggested change
this.nodeVersion = (await this.sdk.getNodesInPool()).find((node) => node.name
=== this.sdk.selectedNodeName)?.version || '-';
try {
this.nodeVersion = (await this.sdk.api.getNodeInfo()).version;
} catch (e) {
this.nodeVersion = '-';
}

src/components/AeBalance.vue Outdated Show resolved Hide resolved
src/components/AeBalance.vue Outdated Show resolved Hide resolved
src/components/ConnectWalletModal.vue Show resolved Hide resolved
src/components/ConnectWalletModal.vue Outdated Show resolved Hide resolved
src/store/modules/aeternity.js Outdated Show resolved Hide resolved
src/store/index.js Show resolved Hide resolved
src/store/index.js Outdated Show resolved Hide resolved
src/store/index.js Outdated Show resolved Hide resolved
src/store/index.js Outdated Show resolved Hide resolved
import contractInfo from 'dex-contracts-v2/package.json';
// TODO: i don't think this is ok
Copy link

Choose a reason for hiding this comment

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

Yes, but using the package.json should be fine

src/components/AboutModal.vue Outdated Show resolved Hide resolved
src/store/index.js Outdated Show resolved Hide resolved
src/store/modules/aeternity.js Outdated Show resolved Hide resolved
@kenodressel kenodressel merged commit 73eb9e0 into main Feb 14, 2024
0 of 2 checks passed
@kenodressel kenodressel deleted the chore/sdk-13 branch February 14, 2024 10:16
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.

Update SDK to the 13 version
4 participants