@@ -43,14 +43,6 @@ pub trait AutomationTimeApi<BlockHash, AccountId, Hash, Balance> {
43
43
at : Option < BlockHash > ,
44
44
) -> RpcResult < FeeDetails < NumberOrHex > > ;
45
45
46
- #[ method( name = "automationTime_getTimeAutomationFees" ) ]
47
- fn get_time_automation_fees (
48
- & self ,
49
- action : AutomationAction ,
50
- executions : u32 ,
51
- at : Option < BlockHash > ,
52
- ) -> RpcResult < u64 > ;
53
-
54
46
/// Returns optimal autostaking period based on principal and a target collator.
55
47
#[ method( name = "automationTime_calculateOptimalAutostaking" ) ]
56
48
fn caclulate_optimal_autostaking (
@@ -154,33 +146,6 @@ where
154
146
} )
155
147
}
156
148
157
- fn get_time_automation_fees (
158
- & self ,
159
- action : AutomationAction ,
160
- executions : u32 ,
161
- at : Option < <Block as BlockT >:: Hash > ,
162
- ) -> RpcResult < u64 > {
163
- let api = self . client . runtime_api ( ) ;
164
- let at = BlockId :: hash ( at. unwrap_or_else ( ||
165
- // If the block hash is not supplied assume the best block.
166
- self . client . info ( ) . best_hash ) ) ;
167
- let runtime_api_result =
168
- api. get_time_automation_fees ( & at, action, executions) . map_err ( |e| {
169
- CallError :: Custom ( ErrorObject :: owned (
170
- Error :: RuntimeError . into ( ) ,
171
- "Unable to get time automation fees" ,
172
- Some ( e. to_string ( ) ) ,
173
- ) )
174
- } ) ?;
175
- runtime_api_result. try_into ( ) . map_err ( |_| {
176
- JsonRpseeError :: Call ( CallError :: Custom ( ErrorObject :: owned (
177
- Error :: RuntimeError . into ( ) ,
178
- "RPC value doesn't fit in u64 representation" ,
179
- Some ( "RPC value cannot be translated into u64 representation" . to_string ( ) ) ,
180
- ) ) )
181
- } )
182
- }
183
-
184
149
fn caclulate_optimal_autostaking (
185
150
& self ,
186
151
principal : i128 ,
0 commit comments