File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
smart_contracts/vm2/sdk/src Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -318,8 +318,6 @@ impl ExecutorV2 {
318318 execution_stack,
319319 } = execute_request;
320320
321- let ( entity_addr, source_purse) = get_purse_for_entity ( & mut tracking_copy, caller_key) ?;
322-
323321 let ( wasm_bytes, export_name) = {
324322 if let ExecutionKind :: SessionBytes ( wasm_bytes) = & execution_kind {
325323 ( wasm_bytes. clone ( ) , DEFAULT_WASM_ENTRY_POINT )
@@ -472,6 +470,8 @@ impl ExecutorV2 {
472470 . take_bytes ( ) ;
473471
474472 if transferred_value != 0 {
473+ let ( entity_addr, source_purse) =
474+ get_purse_for_entity ( & mut tracking_copy, caller_key) ?;
475475 // TODO: consult w/ Michal re: charge timing
476476 let gas_usage = GasUsage :: new_from_limit ( gas_limit) ;
477477
@@ -551,6 +551,8 @@ impl ExecutorV2 {
551551 } ) ? {
552552 Some ( StoredValue :: ByteCode ( bytecode) ) => {
553553 if transferred_value != 0 {
554+ let ( entity_addr, source_purse) =
555+ get_purse_for_entity ( & mut tracking_copy, caller_key) ?;
554556 // TODO: consult w/ Michal re: charge timing
555557 let gas_usage = GasUsage :: new_from_limit ( gas_limit) ;
556558
Original file line number Diff line number Diff line change @@ -224,6 +224,7 @@ impl TryFrom<u32> for CallError {
224224 type Error = ( ) ;
225225
226226 fn try_from ( value : u32 ) -> Result < Self , Self :: Error > {
227+ #[ allow( unreachable_patterns) ]
227228 match value {
228229 CALLEE_ROLLED_BACK => Ok ( Self :: CalleeRolledBack ) ,
229230 CALLEE_TRAPPED => Ok ( Self :: CalleeTrapped ) ,
You can’t perform that action at this time.
0 commit comments