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

feat: show upgrade dialog on get-starknet calls #247

Merged
merged 67 commits into from
Jun 21, 2024
Merged

feat: show upgrade dialog on get-starknet calls #247

merged 67 commits into from
Jun 21, 2024

Conversation

khanti42
Copy link
Collaborator

@khanti42 khanti42 commented Jun 6, 2024

This PR is to add upgrade dialog on below APIs where those are using by get-starknet:

  • starkNet_signDeclareTransaction
  • starkNet_signDeployAccountTransaction
  • starkNet_executeTxn
  • starkNet_declareContract

if above APIS trigger with an Cairo 0, account contract, it will first display an dialog, then reject the request by throw an Error

image

stanleyyconsensys and others added 30 commits October 4, 2023 18:50
* feat: change account contract to cairo 1

- update recover account to return correct address
- update create account to use isAccountAddressDeployed method
- update est gas fee to use new accountClassHash
- add upgradeRequired in to acc object
- fix test case

* fix: update incorrect name

---------

Co-authored-by: Amine Harty <[email protected]>
* feat: change account contract to cairo 1

- update recover account to return correct address
- update create account to use isAccountAddressDeployed method
- update est gas fee to use new accountClassHash
- add upgradeRequired in to acc object
- fix test case

* feat: add blocking on snap method

- add blocking on snap methods
- add test case

* fix: update incorrect name

* fix: lint style

* fix: bug in merge conflict

* fix: update yarn lock
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.5.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](jonschlinkert/word-wrap@1.2.3...1.2.5)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@adobe/css-tools](https://github.com/adobe/css-tools) from 4.2.0 to 4.3.1.
- [Changelog](https://github.com/adobe/css-tools/blob/main/History.md)
- [Commits](https://github.com/adobe/css-tools/commits)

---
updated-dependencies:
- dependency-name: "@adobe/css-tools"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [semver](https://github.com/npm/node-semver) from 7.3.8 to 7.5.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](npm/node-semver@v7.3.8...v7.5.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix: recoverAccount to avoid duplicate called on isUpgradeRequired

* chore: hardcode cairo version 1 to constant CAIRO_VERSION 

* fix: findAddressIndex should return address if the address match either cairo0 or cairo{N}

* fix: getCorrectContractAddress, use getVersion instead of getOwner to determine account has deployed or not

* chore: getCorrectContractAddress to return upgrade required attribute
* fix: fix the get correct account method

* feat: add cairo upgrade api

* fix: rollback package.json

* fix: est fee in upgrade contract
@khanti42
Copy link
Collaborator Author

khanti42 commented Jun 17, 2024

I already merged latest changes from main (including the deployment check for executeTxn), but the PR #254 including these changes in release/2.3.0 is still open.

Base automatically changed from releases/2.3.0 to main June 20, 2024 04:46
Copy link
Collaborator

@stanleyyconsensys stanleyyconsensys left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

Quality Gate Passed Quality Gate passed for 'consensys_starknet-snap-starknet-snap'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
5.7% Duplication on New Code

See analysis details on SonarCloud

Copy link

Quality Gate Passed Quality Gate passed for 'consensys_starknet-snap-wallet-ui'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@khanti42 khanti42 merged commit 4d8a2d7 into main Jun 21, 2024
13 checks passed
@khanti42 khanti42 deleted the feat/sf-618 branch June 21, 2024 13:19
@github-actions github-actions bot mentioned this pull request Jun 20, 2024
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