@@ -280,7 +280,20 @@ module ol_framework::donor_voice_txs {
280280 let tx: Payment = multi_action::extract_proposal_data (multisig_address, &uid);
281281
282282 if (passed && option::is_some (&withdraw_cap_opt)) {
283- schedule (option::borrow (&withdraw_cap_opt), tx, &uid);
283+ // else large payments to slow wallets take longer to review
284+ if (slow_wallet::is_slow (payee)) {
285+ let deadline = epoch_helper::get_current_epoch () + DEFAULT_PAYMENT_DURATION ;
286+ schedule (option::borrow (&withdraw_cap_opt), tx, &uid, deadline);
287+
288+ } else {
289+ // transfer happens immediately after multisig threshold is reached
290+ let can_withdraw = community_wallet_advance::can_withdraw_amount (multisig_address, tx.value);
291+
292+ if (can_withdraw) {
293+ community_wallet_advance::transfer_credit (option::borrow (&withdraw_cap_opt), tx.payee, tx.value);
294+ }
295+ }
296+
284297 };
285298
286299 multi_action::maybe_restore_withdraw_cap (withdraw_cap_opt);
@@ -302,13 +315,11 @@ module ol_framework::donor_voice_txs {
302315 // the rejected list.
303316
304317 fun schedule (
305- withdraw_capability: &WithdrawCapability , tx: Payment , uid: &guid::ID
318+ withdraw_capability: &WithdrawCapability , tx: Payment , uid: &guid::ID , deadline: u64
306319 ) acquires TxSchedule {
307320 let multisig_address = account::get_withdraw_cap_address (withdraw_capability);
308321 let transfers = borrow_global_mut <TxSchedule >(multisig_address);
309322
310- let deadline = epoch_helper::get_current_epoch () + DEFAULT_PAYMENT_DURATION ;
311-
312323 let t = TimedTransfer {
313324 uid: *uid,
314325 deadline, // pays automatically at the end of seventh epoch. Unless there is a veto by a Donor. In that case a day is added for every day there is a veto. This deduplicates vetoes.
@@ -404,7 +415,7 @@ module ol_framework::donor_voice_txs {
404415 let is_slow = slow_wallet::is_slow (t.tx.payee);
405416
406417
407- let this_transfer_value =if (!is_slow) {
418+ let this_transfer_value = if (!is_slow) {
408419 let can_withdraw = community_wallet_advance::can_withdraw_amount (multisig_address, t.tx.value);
409420
410421 if (can_withdraw) {
@@ -1000,21 +1011,9 @@ module ol_framework::donor_voice_txs {
10001011 ids
10011012 }
10021013
1003- // // Helper function to list proposals by status in the multisig system
1004- // fun list_multisig_proposals_by_status(multisig_address: address, status_enum: u8): vector<u64> {
1005- // // Check if we have access to the multi_action module for the Payment type
1006- // if (!multi_action::has_action<Payment>(multisig_address)) {
1007- // return vector::empty<u64>()
1008- // };
1009-
1010- // // Use the new get_proposals_by_status function to fetch IDs directly
1011- // multi_action::get_proposals_by_status<Payment>(multisig_address, status_enum)
1012- // }
1013-
10141014 //////// TRANSACTIONS ////////
10151015
1016- // /// A signer of the multisig can propose a payment
1017- // }
1016+ /// A signer of the multisig can propose a payment
10181017
10191018 public entry fun propose_payment_tx (
10201019 auth: signer ,
0 commit comments