From 587141566ca5be98eedcbe0b5d3b9f3d9812887f Mon Sep 17 00:00:00 2001 From: RXRD <118821868+RiXelanya@users.noreply.github.com> Date: Fri, 22 Sep 2023 20:40:03 +0700 Subject: [PATCH 1/4] fix: add quality control price to genetic analysis order (#466) * Update impl_genetic_analysis_orders.rs * Update impl_genetic_analysis_orders.rs * Update impl_genetic_analysis_orders.rs * Update impl_genetic_analysis_orders.rs --- .../src/impl_genetic_analysis_orders.rs | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/pallets/genetic-analysis-orders/src/impl_genetic_analysis_orders.rs b/pallets/genetic-analysis-orders/src/impl_genetic_analysis_orders.rs index e75426d0..5cbe950d 100644 --- a/pallets/genetic-analysis-orders/src/impl_genetic_analysis_orders.rs +++ b/pallets/genetic-analysis-orders/src/impl_genetic_analysis_orders.rs @@ -1,4 +1,5 @@ use crate::*; +use frame_support::sp_runtime::traits::Zero; use traits_genetic_analysis_orders::{ GeneticAnalysisOrderEventEmitter, GeneticAnalysisOrderStatusUpdater, }; @@ -236,7 +237,16 @@ impl GeneticAnalysisOrderInterface for Pallet { return Err(Error::::GeneticAnalysisOrderNotYetExpired) } - let total_price = genetic_analysis_order.total_price; + let mut testing_price = Zero::zero(); + let mut qc_price = Zero::zero(); + + for price in genetic_analysis_order.prices.iter() { + testing_price += price.value; + } + + for price in genetic_analysis_order.additional_prices.iter() { + qc_price += price.value; + } let asset_id = genetic_analysis_order.asset_id; let account_id = Self::account_id(); @@ -245,7 +255,15 @@ impl GeneticAnalysisOrderInterface for Pallet { &genetic_analysis_order.currency, &account_id, &genetic_analysis_order.customer_id, - total_price, + testing_price, + asset_id, + )?; + + Self::do_transfer( + &genetic_analysis_order.currency, + &account_id, + &genetic_analysis_order.seller_id, + qc_price, asset_id, )?; From 790fe4983a7c52659462060b171d1a8c560a0c8e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 13:43:49 +0700 Subject: [PATCH 2/4] chore(deps): bump actions/checkout from 4.0.0 to 4.1.0 (#467) Bumps [actions/checkout](https://github.com/actions/checkout) from 4.0.0 to 4.1.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/3df4ab11eba7bda6032a0b82a6bb43b11571feac...8ade135a41bc03ea155e62e844d188df1ea18608) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/cicd.yaml | 6 +++--- .github/workflows/cii.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cicd.yaml b/.github/workflows/cicd.yaml index 88442b59..574a3136 100644 --- a/.github/workflows/cicd.yaml +++ b/.github/workflows/cicd.yaml @@ -30,7 +30,7 @@ jobs: name: Test on nightly-2022-07-24 ( ${{ matrix.command }} ) steps: - name: Checkout Repository - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 with: fetch-depth: 0 - name: Install protobuf-compiler @@ -55,7 +55,7 @@ jobs: name: Build steps: - name: Checkout Repository - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 with: fetch-depth: 0 - name: Install protobuf-compiler @@ -125,7 +125,7 @@ jobs: name: Release Please steps: - name: Checkout Repository - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 with: fetch-depth: 0 - name: Compute Version diff --git a/.github/workflows/cii.yaml b/.github/workflows/cii.yaml index af5c9b5d..96e187a2 100644 --- a/.github/workflows/cii.yaml +++ b/.github/workflows/cii.yaml @@ -23,7 +23,7 @@ jobs: name: OpenSSF Scorecards steps: - name: Checkout Repository - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - name: Analize uses: ossf/scorecard-action@08b4669551908b1024bb425080c797723083c031 with: From 7bc8b27312830b63fb15a0a69d47bf9954b39da4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Sep 2023 15:13:28 +0700 Subject: [PATCH 3/4] chore(deps): bump google-github-actions/release-please-action from 3.7.11 to 3.7.12 (#468) chore(deps): bump google-github-actions/release-please-action Bumps [google-github-actions/release-please-action](https://github.com/google-github-actions/release-please-action) from 3.7.11 to 3.7.12. - [Release notes](https://github.com/google-github-actions/release-please-action/releases) - [Changelog](https://github.com/google-github-actions/release-please-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/google-github-actions/release-please-action/compare/ca6063f4ed81b55db15b8c42d1b6f7925866342d...4c5670f886fe259db4d11222f7dff41c1382304d) --- updated-dependencies: - dependency-name: google-github-actions/release-please-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/cicd.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yaml b/.github/workflows/cicd.yaml index 574a3136..684e8af3 100644 --- a/.github/workflows/cicd.yaml +++ b/.github/workflows/cicd.yaml @@ -143,7 +143,7 @@ jobs: echo "semver=$MAJOR.$MINOR.$PATCH" >> $GITHUB_OUTPUT - name: Release id: release - uses: google-github-actions/release-please-action@ca6063f4ed81b55db15b8c42d1b6f7925866342d + uses: google-github-actions/release-please-action@4c5670f886fe259db4d11222f7dff41c1382304d with: token: ${{ secrets.PAT }} fork: true From 9853a412fadf9dff594347d4ad92aa51b174ab85 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Oct 2023 08:17:39 +0700 Subject: [PATCH 4/4] chore(deps): bump ossf/scorecard-action from 2.2.0 to 2.3.0 (#469) Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.2.0 to 2.3.0. - [Release notes](https://github.com/ossf/scorecard-action/releases) - [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md) - [Commits](https://github.com/ossf/scorecard-action/compare/08b4669551908b1024bb425080c797723083c031...483ef80eb98fb506c348f7d62e28055e49fe2398) --- updated-dependencies: - dependency-name: ossf/scorecard-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/cii.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cii.yaml b/.github/workflows/cii.yaml index 96e187a2..0c91ee51 100644 --- a/.github/workflows/cii.yaml +++ b/.github/workflows/cii.yaml @@ -25,7 +25,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - name: Analize - uses: ossf/scorecard-action@08b4669551908b1024bb425080c797723083c031 + uses: ossf/scorecard-action@483ef80eb98fb506c348f7d62e28055e49fe2398 with: results_file: results.sarif results_format: sarif