Skip to content

Commit

Permalink
fix: add token mux calls to borrow proxy (#1774)
Browse files Browse the repository at this point in the history
  • Loading branch information
wischli authored Mar 18, 2024
1 parent 5dfdbba commit 6f0dd0a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 14 deletions.
6 changes: 5 additions & 1 deletion runtime/altair/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,11 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
RuntimeCall::PoolSystem(pallet_pool_system::Call::submit_solution{..}) |
RuntimeCall::PoolSystem(pallet_pool_system::Call::execute_epoch{..}) |
RuntimeCall::Utility(pallet_utility::Call::batch_all{..}) |
RuntimeCall::Utility(pallet_utility::Call::batch{..})
RuntimeCall::Utility(pallet_utility::Call::batch{..}) |
// Borrowers should be able to swap back and forth between local currencies and their variants
RuntimeCall::TokenMux(pallet_token_mux::Call::burn {..}) |
RuntimeCall::TokenMux(pallet_token_mux::Call::deposit {..}) |
RuntimeCall::TokenMux(pallet_token_mux::Call::match_swap {..})
),
ProxyType::Invest => matches!(
c,
Expand Down
28 changes: 16 additions & 12 deletions runtime/centrifuge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -680,22 +680,26 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
ProxyType::Borrow => matches!(
c,
RuntimeCall::Loans(pallet_loans::Call::create { .. }) |
RuntimeCall::Loans(pallet_loans::Call::borrow { .. }) |
RuntimeCall::Loans(pallet_loans::Call::repay { .. }) |
RuntimeCall::Loans(pallet_loans::Call::write_off { .. }) |
RuntimeCall::Loans(pallet_loans::Call::apply_loan_mutation { .. }) |
RuntimeCall::Loans(pallet_loans::Call::close { .. }) |
RuntimeCall::Loans(pallet_loans::Call::apply_write_off_policy { .. }) |
RuntimeCall::Loans(pallet_loans::Call::update_portfolio_valuation { .. }) |
RuntimeCall::Loans(pallet_loans::Call::propose_transfer_debt { .. }) |
RuntimeCall::Loans(pallet_loans::Call::apply_transfer_debt { .. }) |
// Borrowers should be able to close and execute an epoch
// in order to get liquidity from repayments in previous epochs.
RuntimeCall::Loans(pallet_loans::Call::borrow { .. }) |
RuntimeCall::Loans(pallet_loans::Call::repay { .. }) |
RuntimeCall::Loans(pallet_loans::Call::write_off { .. }) |
RuntimeCall::Loans(pallet_loans::Call::apply_loan_mutation { .. }) |
RuntimeCall::Loans(pallet_loans::Call::close { .. }) |
RuntimeCall::Loans(pallet_loans::Call::apply_write_off_policy { .. }) |
RuntimeCall::Loans(pallet_loans::Call::update_portfolio_valuation { .. }) |
RuntimeCall::Loans(pallet_loans::Call::propose_transfer_debt { .. }) |
RuntimeCall::Loans(pallet_loans::Call::apply_transfer_debt { .. }) |
// Borrowers should be able to close and execute an epoch
// in order to get liquidity from repayments in previous epochs.
RuntimeCall::PoolSystem(pallet_pool_system::Call::close_epoch{..}) |
RuntimeCall::PoolSystem(pallet_pool_system::Call::submit_solution{..}) |
RuntimeCall::PoolSystem(pallet_pool_system::Call::execute_epoch{..}) |
RuntimeCall::Utility(pallet_utility::Call::batch_all{..}) |
RuntimeCall::Utility(pallet_utility::Call::batch{..})
RuntimeCall::Utility(pallet_utility::Call::batch{..}) |
// Borrowers should be able to swap back and forth between local currencies and their variants
RuntimeCall::TokenMux(pallet_token_mux::Call::burn {..}) |
RuntimeCall::TokenMux(pallet_token_mux::Call::deposit {..}) |
RuntimeCall::TokenMux(pallet_token_mux::Call::match_swap {..})
),
ProxyType::Invest => matches!(
c,
Expand Down
6 changes: 5 additions & 1 deletion runtime/development/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,11 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
RuntimeCall::PoolSystem(pallet_pool_system::Call::submit_solution { .. }) |
RuntimeCall::PoolSystem(pallet_pool_system::Call::execute_epoch { .. }) |
RuntimeCall::Utility(pallet_utility::Call::batch_all { .. }) |
RuntimeCall::Utility(pallet_utility::Call::batch { .. })
RuntimeCall::Utility(pallet_utility::Call::batch { .. }) |
// Borrowers should be able to swap back and forth between local currencies and their variants
RuntimeCall::TokenMux(pallet_token_mux::Call::burn {..}) |
RuntimeCall::TokenMux(pallet_token_mux::Call::deposit {..}) |
RuntimeCall::TokenMux(pallet_token_mux::Call::match_swap {..})
),
ProxyType::Invest => matches!(
c,
Expand Down

0 comments on commit 6f0dd0a

Please sign in to comment.