File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
crates/sui-framework/packages/sui-framework/sources
sui-execution/latest/sui-move-natives/src Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ public fun redeem_funds<T>(withdrawal: sui::funds_accumulator::Withdrawal<Balanc
110110}
111111
112112/// Create a `Withdrawal<Balance<T>>` from an object to withdraw funds from it.
113- public ( package ) fun withdraw_funds_from_object <T >(
113+ public fun withdraw_funds_from_object <T >(
114114 obj: &mut UID ,
115115 value: u64 ,
116116): Withdrawal <Balance <T >> {
Original file line number Diff line number Diff line change @@ -139,6 +139,11 @@ pub fn withdraw_from_accumulator_address(
139139 } ;
140140
141141 let obj_runtime: & mut ObjectRuntime = context. extensions_mut ( ) . get_mut ( ) ?;
142+
143+ if !obj_runtime. protocol_config . enable_accumulators ( ) {
144+ return Ok ( NativeResult :: err ( cost, E_ADDRESS_BALANCE_NOT_ENABLED ) ) ;
145+ }
146+
142147 obj_runtime. emit_accumulator_event (
143148 accumulator,
144149 MoveAccumulatorAction :: Split ,
You can’t perform that action at this time.
0 commit comments