use-ink / contracts-ui

Web application for deploying wasm smart contracts on Substrate chains that include the FRAME contracts pallet
https://contracts-ui.substrate.io/
GNU General Public License v3.0
61 stars 44 forks source link

fix: requires selected account for interaction to be available #552

Closed peetzweg closed 2 months ago

peetzweg commented 2 months ago

Closes #458 .

As our AccountSelect allows for creating new select options on the fly, the user can create new options which are not available to sign a deployment or a contract call extrinsic. I added a second layer validation of this value in the deploy and interaction of contracts.

Disabling the creation of options on the fly is not what we want, as this component is used as a general account input. In this case we want to offer the user to select known accounts but also put it any valid account id.

The demo shows the error first on the latest deployed version of contracts-ui and later the behavior with the changes in this branch.

https://github.com/paritytech/contracts-ui/assets/839848/61d1c3be-8094-4996-b0bb-767f1bd968eb

netlify[bot] commented 2 months ago

Deploy Preview for contracts-ui ready!

Name Link
Latest commit 29a52a1906819d78dc0bf9bd028bdce2da95adcf
Latest deploy log https://app.netlify.com/sites/contracts-ui/deploys/6617e4e912bb960008ff4216
Deploy Preview https://deploy-preview-552--contracts-ui.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

cypress[bot] commented 2 months ago

Passing run #399 ↗ī¸Ž

0 61 0 0 Flakiness 0
⚠ī¸ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

Merge 29a52a1906819d78dc0bf9bd028bdce2da95adcf into f1d8c8ee1476ea4d26d08300e7d3...
Project: Contracts UI Commit: b7e7d1c307 ℹī¸
Status: Passed Duration: 01:11 💡
Started: Apr 11, 2024 1:28 PM Ended: Apr 11, 2024 1:29 PM

Review all test suite changes for PR #552 ↗ī¸Ž

cypress[bot] commented 2 months ago

Passing run #401 ↗ī¸Ž

0 61 0 0 Flakiness 0
⚠ī¸ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

fix: requires selected account for interaction to be available (#552)
Project: Contracts UI Commit: a3a81e9ddf
Status: Passed Duration: 01:24 💡
Started: Apr 12, 2024 7:13 AM Ended: Apr 12, 2024 7:14 AM

Review all test suite changes for PR #552 ↗ī¸Ž