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

refactor: replace nano contract state call for history call #549

Merged
merged 4 commits into from
Aug 27, 2024

Conversation

alexruzenhack
Copy link
Contributor

@alexruzenhack alexruzenhack commented Aug 27, 2024

Acceptance Criteria

  • Replace call to nano contract state by other call to get nano contract information

This is important because the "/state" endpoint is not consistent as it can return "not found" while the new nano contract was not confirmed by a block.

Closes: #510

Security Checklist

  • Make sure you do not include new dependencies in the project unless strictly necessary and do not include dev-dependencies as production ones. More dependencies increase the possibility of one of them being hijacked and affecting us.

@@ -57,7 +57,7 @@ msgid "[Last] dddd [•] HH:mm"
msgstr "[Última] dddd [•] HH:mm"

#. See https://momentjs.com/docs/#/displaying/calendar-time/
#: src/models.js:107 src/utils.js:426
#: src/models.js:107 src/utils.js:427
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this line changed in src/utils?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ran an update, probably it was lacking an update.

locale/texts.pot Outdated
@@ -48,7 +48,7 @@ msgid "[Last] dddd [•] HH:mm"
msgstr ""

#: src/models.js:107
#: src/utils.js:426
#: src/utils.js:427
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this changed? You didn't change src/utils

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ran an update, probably it was lacking an update.

@@ -45,7 +46,8 @@ export const failureMessage = {
walletNotReadyError: t`Wallet is not ready yet to register a Nano Contract.`,
addressNotMine: t`The informed address does not belong to the wallet.`,
nanoContractStateNotFound: t`Nano Contract not found.`,
nanoContractStateFailure: t`Error while trying to get Nano Contract state.`,
nanoContractFailure: t`Error while trying register Nano Contract.`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
nanoContractFailure: t`Error while trying register Nano Contract.`,
nanoContractFailure: t`Error while trying to register Nano Contract.`,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed: 003a3f8

@alexruzenhack alexruzenhack merged commit 74520c6 into master Aug 27, 2024
1 check passed
@alexruzenhack alexruzenhack deleted the refactor/replace-nc-state branch August 27, 2024 21:47
@tuliomir tuliomir mentioned this pull request Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Request nano contract transaction state by other endpoint then nano_contract/state
3 participants