Skip to content

Commit ed23ca3

Browse files
committed
fix: set amount as zero fix typos
1 parent 4b56c38 commit ed23ca3

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

crates/currency/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ pub mod pallet {
116116
+ TryFrom<U256>
117117
+ TryFrom<i64> // from bitcoin types
118118
+ TryInto<i64> // into bitcoin types
119-
+ From<u128>
120119
+ MaybeSerializeDeserialize
121120
+ FullCodec
122121
+ Copy

crates/issue/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ use currency::Amount;
3838
use frame_support::{dispatch::DispatchError, ensure, pallet_prelude::Weight, traits::Get, transactional, PalletId};
3939
use frame_system::{ensure_root, ensure_signed};
4040
pub use pallet::*;
41-
use primitives::{AccountOrVault, Balance};
41+
use primitives::AccountOrVault;
4242
use sp_core::H256;
43-
use sp_runtime::traits::{AccountIdConversion, Convert, Saturating, Zero};
43+
use sp_runtime::traits::{AccountIdConversion, Convert, Saturating};
4444
use sp_std::vec::Vec;
4545
use types::IssueRequestExt;
4646
use vault_registry::{types::CurrencyId, CurrencySource, VaultStatus};
@@ -366,9 +366,9 @@ impl<T: Config> Pallet<T> {
366366
let (griefing_collateral, fee, amount_user) = if requester.is_vault_account() {
367367
(
368368
// for replace request griefing collateral remains as zero
369-
Amount::new(Balance::zero().into(), griefing_currency),
369+
Amount::zero(griefing_currency),
370370
// for replace request fee remains as zero
371-
Amount::new(Balance::zero().into(), vault_id.wrapped_currency()),
371+
Amount::zero(vault_id.wrapped_currency()),
372372
// for replace amount given to old_vault should be equal to specified amount
373373
amount_requested.clone(),
374374
)

crates/redeem/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,10 +629,10 @@ impl<T: Config> Pallet<T> {
629629

630630
(
631631
fee_wrapped,
632-
// the inclusion fee is paid by new vault itself hence we can set it as zero
632+
// the inclusion fee is paid by old vault itself hence we can set it as zero
633633
Amount::zero(vault_id.wrapped_currency()),
634634
// the new vault (redeemer) should receive the whole amount without deduction of fees
635-
// as fee handling is done by new vault itself
635+
// as fee handling is done by old vault itself
636636
amount_wrapped,
637637
)
638638
} else {

0 commit comments

Comments
 (0)