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: increase network size to 32 characters in the database #204

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

andreabadesso
Copy link
Collaborator

@andreabadesso andreabadesso commented Jan 10, 2025

Motivation

We store in the wallet-service the data from the fullnode's /v1a/version API in a version_data table.

This is done lazily when wallets request the /version API, it detects that the data it has in the database expired and requests again.

We noticed that the network field was being stored truncated, e.g.:

testnet-
nano-tes

Upon investigation, we found out that the version_data table had too few characters in its definition for the network column:

...
      version: {
        type: Sequelize.STRING(11),
        allowNull: false,
      },
      network: {
        type: Sequelize.STRING(8),
        allowNull: false,
      },
      min_weight: {
        type: Sequelize.FLOAT.UNSIGNED,
        allowNull: false,
      },
...

Which was causing it to truncate text when inserting.

Acceptance Criteria

  • We should increase the size of the network column.

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged
  • Make sure either the unit tests and/or the QA tests are capable of testing the new features
  • 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.

@andreabadesso andreabadesso self-assigned this Jan 10, 2025
@andreabadesso andreabadesso added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels Jan 10, 2025
@andreabadesso andreabadesso merged commit 878730a into master Jan 15, 2025
1 check passed
@andreabadesso andreabadesso deleted the refactor/increase-network-size-in-versiondata branch January 15, 2025 14:15
@andreabadesso andreabadesso mentioned this pull request Jan 22, 2025
2 tasks
andreabadesso added a commit that referenced this pull request Jan 24, 2025
* refactor: increase network size to 32 characters in the database (#204)

* chore: bumped to v1.6.4 (#205)

* fix: invalid parameter being sent to sendMessageSQS (#209)

* fix: invalid parameter being sent to sendMessageSQS

* refactor: added helper method to send realtime tx

* docs: added docstring to sendRealtimeTx

* refactor: removed unused import
@andreabadesso andreabadesso mentioned this pull request Jan 24, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants