Skip to content

Commit

Permalink
fix wrong origin
Browse files Browse the repository at this point in the history
  • Loading branch information
open-junius committed Jan 31, 2025
1 parent bb2a759 commit b2d57a7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion runtime/src/precompiles/neuron.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,12 @@ impl NeuronPrecompile {
netuid,
hotkey,
});
try_dispatch_runtime_call(handle, call, contract_to_origin(&CONTRACT_ADDRESS_SS58)?)

let account_id =
<HashedAddressMapping<BlakeTwo256> as AddressMapping<AccountId32>>::into_account_id(
handle.context().caller,
);
try_dispatch_runtime_call(handle, call, RawOrigin::Signed(account_id))
}

fn parse_netuid_hotkey_parameter(data: &[u8]) -> Result<(u16, AccountId32), PrecompileFailure> {
Expand Down

0 comments on commit b2d57a7

Please sign in to comment.