Skip to content

Commit

Permalink
Merge pull request #56 from nutsfinance/update-polkadot-stable2407
Browse files Browse the repository at this point in the history
update to stable2407
  • Loading branch information
xlc authored Aug 2, 2024
2 parents adce350 + 7810f50 commit 0bd730d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 17 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,12 @@ on:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
clean-up-actions:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
# Only cancel non-master branch runs
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
test:
runs-on: ubuntu-latest
needs: clean-up-actions
defaults:
run:
working-directory: lib/stable-asset
Expand Down
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ parity-scale-codec = { version = "3.6.5", default-features = false, features = [
scale-info = { version = "2.10.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.101", default-features = false }

frame-support = { version = "31.0.0", default-features = false }
frame-system = { version = "31.0.0", default-features = false }
sp-core = { version = "31.0.0", default-features = false }
frame-support = { version = "37.0.0", default-features = false }
frame-system = { version = "37.0.0", default-features = false }
sp-core = { version = "34.0.0", default-features = false }
sp-std = { version = "14.0.0", default-features = false }
sp-runtime = { version = "34.0.0", default-features = false }
sp-io = { version = "33.0.0", default-features = false }
pallet-balances = { version = "31.0.0", default-features = false }
sp-runtime = { version = "39.0.0", default-features = false }
sp-io = { version = "38.0.0", default-features = false }
pallet-balances = { version = "38.0.0", default-features = false }
3 changes: 3 additions & 0 deletions lib/stable-asset/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1798,6 +1798,7 @@ impl<T: Config> StableAsset for Pallet<T> {
pool_info.pool_asset,
who,
redeem_amount,
Preservation::Expendable,
Precision::Exact,
Fortitude::Polite,
)?;
Expand Down Expand Up @@ -1883,6 +1884,7 @@ impl<T: Config> StableAsset for Pallet<T> {
pool_info.pool_asset,
who,
redeem_amount,
Preservation::Expendable,
Precision::Exact,
Fortitude::Polite,
)?;
Expand Down Expand Up @@ -1973,6 +1975,7 @@ impl<T: Config> StableAsset for Pallet<T> {
pool_info.pool_asset,
who,
burn_amount,
Preservation::Expendable,
Precision::Exact,
Fortitude::Polite,
)?;
Expand Down
10 changes: 9 additions & 1 deletion lib/stable-asset/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ impl Mutate<AccountId> for TestAssets {
asset: AssetId,
dest: &AccountId,
amount: Balance,
_preservation: Preservation,
_precision: Precision,
_fortitude: Fortitude,
) -> Result<Balance, DispatchError> {
Expand All @@ -153,7 +154,14 @@ impl Mutate<AccountId> for TestAssets {
amount: Balance,
_preservation: Preservation,
) -> Result<Balance, DispatchError> {
Self::burn_from(asset, source, amount, Precision::Exact, Fortitude::Polite)?;
Self::burn_from(
asset,
source,
amount,
Preservation::Expendable,
Precision::Exact,
Fortitude::Polite,
)?;
Self::mint_into(asset, dest, amount)?;
Ok(amount)
}
Expand Down

0 comments on commit 0bd730d

Please sign in to comment.