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(trade): Block users from trading with an old app version #2174

Merged
merged 6 commits into from Mar 6, 2024

Conversation

holzeis
Copy link
Contributor

@holzeis holzeis commented Mar 6, 2024

I opted to use the Cargo.toml version instead of the pubspec.yaml version as it is easier to access from rust and should probably anyways be bumped with every release.

A minor downside of this is now that we have to different sources for the version. However, both versions are bumped by the same ci pipeline during draft_new_release - so eventually the source is the same.

Simulator.Screen.Recording.-.iPhone.15.-.2024-03-06.at.16.19.14.mp4

fixes #2141
fixes #1748

@holzeis holzeis self-assigned this Mar 6, 2024
@holzeis holzeis changed the title feat(trade): Block users from trading with and old app version feat(trade): Block users from trading with an old app version Mar 6, 2024
Copy link
Contributor

@luckysori luckysori left a comment

Choose a reason for hiding this comment

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

Looks good overall, but I left some suggestions.

crates/orderbook-client/src/lib.rs Show resolved Hide resolved
.github/workflows/draft_new_release.yml Outdated Show resolved Hide resolved
.github/workflows/draft_new_release.yml Show resolved Hide resolved
coordinator/src/db/user.rs Outdated Show resolved Hide resolved
coordinator/src/db/user.rs Outdated Show resolved Hide resolved
coordinator/src/db/user.rs Outdated Show resolved Hide resolved
mobile/native/src/trade/order/orderbook_client.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@luckysori luckysori left a comment

Choose a reason for hiding this comment

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

Thanks for going through my review.

I opted to use the Cargo.toml version instead of the pubspec.yaml version as it is easier to access from rust and should probably anyways be bumped with every release.

A minor downside of this is now that we have to different sources for the version. However, both versions are bumped by the same ci pipeline during `draft_new_release` - so eventually the source is the same.
We might want to consider simply bumping the versions of all crates instead of selectively bumping some.
@holzeis holzeis force-pushed the chore/block-users-from-trading-with-old-versions branch from 13ab779 to a7e479b Compare March 6, 2024 17:33
@holzeis holzeis force-pushed the chore/block-users-from-trading-with-old-versions branch from a7e479b to bb70acb Compare March 6, 2024 17:34
@holzeis holzeis added this pull request to the merge queue Mar 6, 2024
Merged via the queue into main with commit 34751f4 Mar 6, 2024
20 checks passed
@holzeis holzeis deleted the chore/block-users-from-trading-with-old-versions branch March 6, 2024 18:37
Comment on lines +66 to +70
- name: Bump mobile/native Cargo.toml version
uses: stellar/binaries@v13
with:
name: cargo-edit
version: 0.11.6
Copy link
Contributor

Choose a reason for hiding this comment

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

❌ This step already exists a few lines above

- id: set-mobile-version
continue-on-error: true
run: |
cargo set-version --package mobile/native ${{ github.event.inputs.version }}
Copy link
Contributor

Choose a reason for hiding this comment

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

❌ At least locally this does not work.
Correct would be

Suggested change
cargo set-version --package mobile/native ${{ github.event.inputs.version }}
cargo set-version --package native ${{ github.event.inputs.version }}

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 tested it locally with a different command. Thanks for the fix 🙂

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.

Block old versions from trading Update Cargo.lock during draft-new-release CI workflow
3 participants